Explicitly more Error when returning it (NFC)
authorMehdi Amini <joker.eph@gmail.com>
Mon, 16 Jan 2023 15:07:46 +0000 (15:07 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Mon, 16 Jan 2023 15:07:46 +0000 (15:07 +0000)
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

index c293fdd..ebc57bd 100644 (file)
@@ -297,7 +297,7 @@ Expected<SubtargetFeatures> ELFObjectFileBase::getRISCVFeatures() const {
 
   RISCVAttributeParser Attributes;
   if (Error E = getBuildAttributes(Attributes)) {
-    return E;
+    return std::move(E);
   }
 
   std::optional<StringRef> Attr =