[llvm] r364168 - Follow up of rL363913. NFC.
Sjoerd Meijer via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 24 01:44:29 PDT 2019
Author: sjoerdmeijer
Date: Mon Jun 24 01:44:29 2019
New Revision: 364168
URL: http://llvm.org/viewvc/llvm-project?rev=364168&view=rev
Log:
Follow up of rL363913. NFC.
Minor reshuffle in AArch64 targetparser unittest, solving a potential problem
with querying iterators too early.
Modified:
llvm/trunk/unittests/Support/TargetParserTest.cpp
Modified: llvm/trunk/unittests/Support/TargetParserTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/TargetParserTest.cpp?rev=364168&r1=364167&r2=364168&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/TargetParserTest.cpp (original)
+++ llvm/trunk/unittests/Support/TargetParserTest.cpp Mon Jun 24 01:44:29 2019
@@ -1053,16 +1053,18 @@ TEST(TargetParserTest, AArch64ExtensionF
std::vector<StringRef> Features;
unsigned ExtVal = 0;
- for (auto E : Extensions)
- ExtVal |= E;
+ for (auto Ext : Extensions)
+ ExtVal |= Ext;
+
+ EXPECT_FALSE(AArch64::getExtensionFeatures(AArch64::AEK_INVALID, Features));
+ EXPECT_TRUE(!Features.size());
AArch64::getExtensionFeatures(ExtVal, Features);
+ EXPECT_TRUE(Extensions.size() == Features.size());
+
auto B = std::begin(Features);
auto E = std::end(Features);
- EXPECT_FALSE(AArch64::getExtensionFeatures(AArch64::AEK_INVALID, Features));
- EXPECT_TRUE(Extensions.size() == Features.size());
-
EXPECT_TRUE(std::find(B, E, "+crc") != E);
EXPECT_TRUE(std::find(B, E, "+crypto") != E);
EXPECT_TRUE(std::find(B, E, "+fp-armv8") != E);
More information about the llvm-commits
mailing list