aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ELFObjectFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/ELFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/ELFObjectFile.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Object/ELFObjectFile.cpp b/llvm/lib/Object/ELFObjectFile.cpp
index 8627d1b..c919d25 100644
--- a/llvm/lib/Object/ELFObjectFile.cpp
+++ b/llvm/lib/Object/ELFObjectFile.cpp
@@ -297,8 +297,11 @@ SubtargetFeatures ELFObjectFileBase::getRISCVFeatures() const {
// Add features according to the ELF attribute section.
// If there are any unrecognized features, ignore them.
RISCVAttributeParser Attributes;
- if (Error E = getBuildAttributes(Attributes))
+ if (Error E = getBuildAttributes(Attributes)) {
+ // TODO Propagate Error.
+ consumeError(std::move(E));
return Features; // Keep "c" feature if there is one in PlatformFlags.
+ }
Optional<StringRef> Attr = Attributes.getAttributeString(RISCVAttrs::ARCH);
if (Attr.hasValue()) {