[DebugInfo] Use llvm::find_if (NFC) (#141521)
This commit is contained in:
@@ -135,15 +135,11 @@ void checkElementPropertiesClangCodeview(LVReader *Reader) {
|
||||
ASSERT_NE(Types, nullptr);
|
||||
EXPECT_EQ(Types->size(), 6u);
|
||||
|
||||
const auto BoolType =
|
||||
std::find_if(Types->begin(), Types->end(), [](const LVElement *elt) {
|
||||
return elt->getName() == "bool";
|
||||
});
|
||||
const auto BoolType = llvm::find_if(
|
||||
*Types, [](const LVElement *elt) { return elt->getName() == "bool"; });
|
||||
ASSERT_NE(BoolType, Types->end());
|
||||
const auto IntType =
|
||||
std::find_if(Types->begin(), Types->end(), [](const LVElement *elt) {
|
||||
return elt->getName() == "int";
|
||||
});
|
||||
const auto IntType = llvm::find_if(
|
||||
*Types, [](const LVElement *elt) { return elt->getName() == "int"; });
|
||||
ASSERT_NE(IntType, Types->end());
|
||||
EXPECT_EQ(static_cast<LVType *>(*BoolType)->getBitSize(), 8u);
|
||||
EXPECT_EQ(static_cast<LVType *>(*BoolType)->getStorageSizeInBytes(), 1u);
|
||||
@@ -221,15 +217,11 @@ void checkElementPropertiesMsvcCodeview(LVReader *Reader) {
|
||||
ASSERT_NE(Types, nullptr);
|
||||
EXPECT_EQ(Types->size(), 8u);
|
||||
|
||||
const auto BoolType =
|
||||
std::find_if(Types->begin(), Types->end(), [](const LVElement *elt) {
|
||||
return elt->getName() == "bool";
|
||||
});
|
||||
const auto BoolType = llvm::find_if(
|
||||
*Types, [](const LVElement *elt) { return elt->getName() == "bool"; });
|
||||
ASSERT_NE(BoolType, Types->end());
|
||||
const auto IntType =
|
||||
std::find_if(Types->begin(), Types->end(), [](const LVElement *elt) {
|
||||
return elt->getName() == "int";
|
||||
});
|
||||
const auto IntType = llvm::find_if(
|
||||
*Types, [](const LVElement *elt) { return elt->getName() == "int"; });
|
||||
ASSERT_NE(IntType, Types->end());
|
||||
EXPECT_EQ(static_cast<LVType *>(*BoolType)->getBitSize(), 8u);
|
||||
EXPECT_EQ(static_cast<LVType *>(*BoolType)->getStorageSizeInBytes(), 1u);
|
||||
|
||||
@@ -132,15 +132,11 @@ void checkElementProperties(LVReader *Reader) {
|
||||
ASSERT_NE(Types, nullptr);
|
||||
EXPECT_EQ(Types->size(), 7u);
|
||||
|
||||
const auto BoolType =
|
||||
std::find_if(Types->begin(), Types->end(), [](const LVElement *elt) {
|
||||
return elt->getName() == "bool";
|
||||
});
|
||||
const auto BoolType = llvm::find_if(
|
||||
*Types, [](const LVElement *elt) { return elt->getName() == "bool"; });
|
||||
ASSERT_NE(BoolType, Types->end());
|
||||
const auto IntType =
|
||||
std::find_if(Types->begin(), Types->end(), [](const LVElement *elt) {
|
||||
return elt->getName() == "int";
|
||||
});
|
||||
const auto IntType = llvm::find_if(
|
||||
*Types, [](const LVElement *elt) { return elt->getName() == "int"; });
|
||||
ASSERT_NE(IntType, Types->end());
|
||||
EXPECT_EQ(static_cast<LVType *>(*BoolType)->getBitSize(), 8u);
|
||||
EXPECT_EQ(static_cast<LVType *>(*BoolType)->getStorageSizeInBytes(), 1u);
|
||||
|
||||
Reference in New Issue
Block a user