aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ELFObjectFile.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-20 22:45:45 -0700
committerKazu Hirata <kazu@google.com>2022-06-20 22:45:45 -0700
commit7a47ee51a145a40332311330ef45b5d62d8ae023 (patch)
tree2e7ac16bc8430595cbe68692d08111f028b5f995 /llvm/lib/Object/ELFObjectFile.cpp
parent9cfbe7bbfea762d72b60c51c8ab5dadf6b317a9a (diff)
downloadllvm-7a47ee51a145a40332311330ef45b5d62d8ae023.zip
llvm-7a47ee51a145a40332311330ef45b5d62d8ae023.tar.gz
llvm-7a47ee51a145a40332311330ef45b5d62d8ae023.tar.bz2
[llvm] Don't use Optional::getValue (NFC)
Diffstat (limited to 'llvm/lib/Object/ELFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/ELFObjectFile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/ELFObjectFile.cpp b/llvm/lib/Object/ELFObjectFile.cpp
index 319b69a..9bac454 100644
--- a/llvm/lib/Object/ELFObjectFile.cpp
+++ b/llvm/lib/Object/ELFObjectFile.cpp
@@ -307,7 +307,7 @@ SubtargetFeatures ELFObjectFileBase::getRISCVFeatures() const {
// The Arch pattern is [rv32|rv64][i|e]version(_[m|a|f|d|c]version)*
// Version string pattern is (major)p(minor). Major and minor are optional.
// For example, a version number could be 2p0, 2, or p92.
- StringRef Arch = Attr.getValue();
+ StringRef Arch = *Attr;
if (Arch.consume_front("rv32"))
Features.AddFeature("64bit", false);
else if (Arch.consume_front("rv64"))