Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions llvm/lib/Transforms/IPO/LowerTypeTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2453,6 +2453,17 @@ bool LowerTypeTestsModule::lower() {
} else {
Alias->setName(AliasName);
}

if (auto *F = M.getFunction((AliasName + ".cfi").str())) {
// Function can be an alias. In such case we need definition of .cfi
// of aliasee.
if (auto *CfiAleasee = M.getFunction((Aliasee + ".cfi").str())) {
F->replaceAllUsesWith(CfiAleasee);
F->eraseFromParent();
} else {
F->setName(Aliasee + ".cfi");
}
}
}
}
}
Expand Down