From 0a7ac76b10d12616aa83e00be5b36ebeb83d081d Mon Sep 17 00:00:00 2001 From: youben11 Date: Wed, 8 Dec 2021 10:46:59 +0100 Subject: [PATCH] fix: move unique_ptr to be converted to llvm::Expected gcc 6.3 was complaining about not being able to wrap it in an llvm::Expected --- compiler/lib/Support/KeySet.cpp | 2 +- compiler/lib/Support/KeySetCache.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/lib/Support/KeySet.cpp b/compiler/lib/Support/KeySet.cpp index 87a420d9f..3790eef3d 100644 --- a/compiler/lib/Support/KeySet.cpp +++ b/compiler/lib/Support/KeySet.cpp @@ -48,7 +48,7 @@ KeySet::generate(ClientParameters ¶ms, uint64_t seed_msb, << "Cannot setup encryption material: " << std::move(fillError); } - return a; + return std::move(a); } std::unique_ptr KeySet::uninitialized() { diff --git a/compiler/lib/Support/KeySetCache.cpp b/compiler/lib/Support/KeySetCache.cpp index e433b40b1..6dedf3a51 100644 --- a/compiler/lib/Support/KeySetCache.cpp +++ b/compiler/lib/Support/KeySetCache.cpp @@ -108,7 +108,7 @@ KeySetCache::tryLoadKeys(ClientParameters ¶ms, uint64_t seed_msb, return StreamStringError() << "Cannot setup encryption material: " << err; } - return key_set; + return std::move(key_set); } llvm::Error saveKeys(KeySet &key_set, llvm::SmallString<0> &folderPath) {