forked from OSchip/llvm-project
Follow up of rL363913. NFC.
Minor reshuffle in AArch64 targetparser unittest, solving a potential problem with querying iterators too early. llvm-svn: 364168
This commit is contained in:
parent
8c1b73591f
commit
a94c18fc20
|
@ -1053,16 +1053,18 @@ TEST(TargetParserTest, AArch64ExtensionFeatures) {
|
||||||
std::vector<StringRef> Features;
|
std::vector<StringRef> Features;
|
||||||
|
|
||||||
unsigned ExtVal = 0;
|
unsigned ExtVal = 0;
|
||||||
for (auto E : Extensions)
|
for (auto Ext : Extensions)
|
||||||
ExtVal |= E;
|
ExtVal |= Ext;
|
||||||
|
|
||||||
AArch64::getExtensionFeatures(ExtVal, Features);
|
|
||||||
auto B = std::begin(Features);
|
|
||||||
auto E = std::end(Features);
|
|
||||||
|
|
||||||
EXPECT_FALSE(AArch64::getExtensionFeatures(AArch64::AEK_INVALID, Features));
|
EXPECT_FALSE(AArch64::getExtensionFeatures(AArch64::AEK_INVALID, Features));
|
||||||
|
EXPECT_TRUE(!Features.size());
|
||||||
|
|
||||||
|
AArch64::getExtensionFeatures(ExtVal, Features);
|
||||||
EXPECT_TRUE(Extensions.size() == Features.size());
|
EXPECT_TRUE(Extensions.size() == Features.size());
|
||||||
|
|
||||||
|
auto B = std::begin(Features);
|
||||||
|
auto E = std::end(Features);
|
||||||
|
|
||||||
EXPECT_TRUE(std::find(B, E, "+crc") != E);
|
EXPECT_TRUE(std::find(B, E, "+crc") != E);
|
||||||
EXPECT_TRUE(std::find(B, E, "+crypto") != E);
|
EXPECT_TRUE(std::find(B, E, "+crypto") != E);
|
||||||
EXPECT_TRUE(std::find(B, E, "+fp-armv8") != E);
|
EXPECT_TRUE(std::find(B, E, "+fp-armv8") != E);
|
||||||
|
|
Loading…
Reference in New Issue