Drop isCandidateForInline

This commit is contained in:
Pietro Fezzardi
2024-04-11 08:14:52 +02:00
parent 8a7b5d4a25
commit e052dee40f
2 changed files with 4 additions and 11 deletions
+3 -10
View File
@@ -76,12 +76,10 @@ TypeSet TypeInlineHelper::findTypesToInline(const model::Binary &Model,
for (const UpcastablePointer<model::Type> &T : Model.Types()) {
for (const model::QualifiedType &QT : T->edges()) {
auto *DependantType = QT.UnqualifiedType().get();
if (llvm::isa<model::RawFunctionType>(T.get())
or llvm::isa<model::CABIFunctionType>(T.get())
or llvm::isa<model::TypedefType>(T.get())) {
// Used as typename.
if (declarationIsDefinition(T.get())) {
// Should never be inlined
ShouldIgnore.insert(DependantType);
} else if (isCandidateForInline(DependantType)) {
} else {
// If it comes from a Type other than a function, consider that we are
// interested for the type, or if it was referenced from a type other
// than itself.
@@ -660,11 +658,6 @@ void printDefinition(Logger<> &Log,
}
}
bool isCandidateForInline(const model::Type *T) {
return llvm::isa<model::StructType>(T) or llvm::isa<model::UnionType>(T)
or llvm::isa<model::EnumType>(T);
}
using UPtrTy = UpcastablePointer<model::Type>;
TypeSet TypeInlineHelper::getNestedTypesToInline(const model::Type *RootType,
const UPtrTy &NestedTy) const {