From 5ab0894fd570b74907255a4e70c716abd1b5063a Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Mon, 16 Jan 2023 15:07:46 +0000 Subject: Explicitly more Error when returning it (NFC) This is an attempt to fix a build failure: llvm/lib/Object/ELFObjectFile.cpp:300:12: error: call to deleted constructor of 'llvm::Error' return E; --- llvm/lib/Object/ELFObjectFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Object/ELFObjectFile.cpp') diff --git a/llvm/lib/Object/ELFObjectFile.cpp b/llvm/lib/Object/ELFObjectFile.cpp index c293fdd..ebc57bd 100644 --- a/llvm/lib/Object/ELFObjectFile.cpp +++ b/llvm/lib/Object/ELFObjectFile.cpp @@ -297,7 +297,7 @@ Expected ELFObjectFileBase::getRISCVFeatures() const { RISCVAttributeParser Attributes; if (Error E = getBuildAttributes(Attributes)) { - return E; + return std::move(E); } std::optional Attr = -- cgit v1.1