llvm.org GIT mirror llvm / 2c64704
Follow up of rL363913. NFC. Minor reshuffle in AArch64 targetparser unittest, solving a potential problem with querying iterators too early. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364168 91177308-0d34-0410-b5e6-96231b3b80d8 Sjoerd Meijer 3 months ago
1 changed file(s) with 7 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
10521052 std::vector Features;
10531053
10541054 unsigned ExtVal = 0;
1055 for (auto E : Extensions)
1056 ExtVal |= E;
1055 for (auto Ext : Extensions)
1056 ExtVal |= Ext;
1057
1058 EXPECT_FALSE(AArch64::getExtensionFeatures(AArch64::AEK_INVALID, Features));
1059 EXPECT_TRUE(!Features.size());
10571060
10581061 AArch64::getExtensionFeatures(ExtVal, Features);
1062 EXPECT_TRUE(Extensions.size() == Features.size());
1063
10591064 auto B = std::begin(Features);
10601065 auto E = std::end(Features);
1061
1062 EXPECT_FALSE(AArch64::getExtensionFeatures(AArch64::AEK_INVALID, Features));
1063 EXPECT_TRUE(Extensions.size() == Features.size());
10641066
10651067 EXPECT_TRUE(std::find(B, E, "+crc") != E);
10661068 EXPECT_TRUE(std::find(B, E, "+crypto") != E);