diff options
author | Luke Lau <luke@igalia.com> | 2024-01-09 15:33:51 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-09 15:33:51 +0700 |
commit | db78c30ba772af1466bb0d0c1d376c8e642ee4a9 (patch) | |
tree | d4f1e8720eec2c5cc0e892ba1bfc5991ff2b2899 /llvm/lib/Object/ELFObjectFile.cpp | |
parent | 2357e899cb11e05312c54b689ebd0355487be6bc (diff) | |
download | llvm-db78c30ba772af1466bb0d0c1d376c8e642ee4a9.zip llvm-db78c30ba772af1466bb0d0c1d376c8e642ee4a9.tar.gz llvm-db78c30ba772af1466bb0d0c1d376c8e642ee4a9.tar.bz2 |
[RISCV] Deduplicate RISCVISAInfo::toFeatures/toFeatureVector. NFC (#76942)
toFeatures and toFeatureVector both output a list of target feature
flags, just with a slightly different interface. toFeatures keeps any
unsupported extensions, and also provides a way to append negative
extensions (AddAllExtensions=true).
This patch combines them into one function, so that a later patch will
be be able to get a std::vector of features that includes all the
negative extensions, which was previously only possible through the
StrAlloc interface.
Diffstat (limited to 'llvm/lib/Object/ELFObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/ELFObjectFile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/ELFObjectFile.cpp b/llvm/lib/Object/ELFObjectFile.cpp index 95c4f9f..ae21b81 100644 --- a/llvm/lib/Object/ELFObjectFile.cpp +++ b/llvm/lib/Object/ELFObjectFile.cpp @@ -315,7 +315,7 @@ Expected<SubtargetFeatures> ELFObjectFileBase::getRISCVFeatures() const { else llvm_unreachable("XLEN should be 32 or 64."); - Features.addFeaturesVector(ISAInfo->toFeatureVector()); + Features.addFeaturesVector(ISAInfo->toFeatures()); } return Features; |