aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/TargetParserTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/Support/TargetParserTest.cpp')
-rw-r--r--llvm/unittests/Support/TargetParserTest.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/unittests/Support/TargetParserTest.cpp b/llvm/unittests/Support/TargetParserTest.cpp
index 8f48c63..6d43e6c4 100644
--- a/llvm/unittests/Support/TargetParserTest.cpp
+++ b/llvm/unittests/Support/TargetParserTest.cpp
@@ -683,9 +683,8 @@ TEST(TargetParserTest, ARMExtensionFeatures) {
std::map<uint64_t, std::vector<StringRef>> Extensions;
for (auto &Ext : ARM::ARCHExtNames) {
- if (Ext.Feature && Ext.NegFeature)
- Extensions[Ext.ID] = { StringRef(Ext.Feature),
- StringRef(Ext.NegFeature) };
+ if (!Ext.Feature.empty() && !Ext.NegFeature.empty())
+ Extensions[Ext.ID] = {Ext.Feature, Ext.NegFeature};
}
Extensions[ARM::AEK_HWDIVARM] = { "+hwdiv-arm", "-hwdiv-arm" };