summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/common/execution_response.hpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-08-05 09:33:44 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-08-07 14:43:19 +0200
commitc1edc2e21ecf381470d71767dc38a83c85f57d23 (patch)
treecf14c408ee080df389c9f79d3be95eb253285839 /src/buildtool/execution_api/common/execution_response.hpp
parent7012f6c0762cf11e7b1c22304f8fb0b3b330cd0a (diff)
downloadjustbuild-c1edc2e21ecf381470d71767dc38a83c85f57d23.tar.gz
Avoid deep copies of containers in responses.
Diffstat (limited to 'src/buildtool/execution_api/common/execution_response.hpp')
-rw-r--r--src/buildtool/execution_api/common/execution_response.hpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/buildtool/execution_api/common/execution_response.hpp b/src/buildtool/execution_api/common/execution_response.hpp
index 3ad4e2ba..57e1f087 100644
--- a/src/buildtool/execution_api/common/execution_response.hpp
+++ b/src/buildtool/execution_api/common/execution_response.hpp
@@ -56,13 +56,12 @@ class IExecutionResponse {
[[nodiscard]] virtual auto StdOut() noexcept -> std::string = 0;
- [[nodiscard]] virtual auto ActionDigest() const noexcept -> std::string = 0;
+ [[nodiscard]] virtual auto ActionDigest() const noexcept
+ -> std::string const& = 0;
- [[nodiscard]] virtual auto Artifacts() noexcept -> ArtifactInfos = 0;
-
- // Artifacts plus extra useful info
- [[nodiscard]] virtual auto ArtifactsWithDirSymlinks() noexcept
- -> std::pair<ArtifactInfos, DirSymlinks> = 0;
+ [[nodiscard]] virtual auto Artifacts() noexcept -> ArtifactInfos const& = 0;
+ [[nodiscard]] virtual auto DirectorySymlinks() noexcept
+ -> DirSymlinks const& = 0;
};
#endif // INCLUDED_SRC_BUILDTOOL_EXECUTION_API_COMMON_REMOTE_EXECUTION_RESPONSE_HPP