mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
Address http://bugs.llvm.org/pr32207 by making BannerPrinted local to runOnSCC and skipping banner for function declarations.
Reviewed By: Mehdi AMINI Differential Revision: https://reviews.llvm.org/D34086 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305179 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -608,18 +608,18 @@ namespace {
|
||||
}
|
||||
|
||||
bool runOnSCC(CallGraphSCC &SCC) override {
|
||||
bool BannerPrinted = false;
|
||||
auto PrintBannerOnce = [&] () {
|
||||
static bool BannerPrinted = false;
|
||||
if (BannerPrinted)
|
||||
return;
|
||||
Out << Banner;
|
||||
BannerPrinted = true;
|
||||
};
|
||||
for (CallGraphNode *CGN : SCC) {
|
||||
if (CGN->getFunction()) {
|
||||
if (isFunctionInPrintList(CGN->getFunction()->getName())) {
|
||||
if (Function *F = CGN->getFunction()) {
|
||||
if (!F->isDeclaration() && isFunctionInPrintList(F->getName())) {
|
||||
PrintBannerOnce();
|
||||
CGN->getFunction()->print(Out);
|
||||
F->print(Out);
|
||||
}
|
||||
} else if (llvm::isFunctionInPrintList("*")) {
|
||||
PrintBannerOnce();
|
||||
|
||||
Reference in New Issue
Block a user