Skip to content

Commit

Permalink
[IR] Avoid dangling else warning. NFC.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319567 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
d0k committed Dec 1, 2017
1 parent 5608259 commit 79df7df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/IR/IRPrintingPasses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ PrintFunctionPass::PrintFunctionPass(raw_ostream &OS, const std::string &Banner)

PreservedAnalyses PrintFunctionPass::run(Function &F,
FunctionAnalysisManager &) {
if (isFunctionInPrintList(F.getName()))
if (isFunctionInPrintList(F.getName())) {
if (forcePrintModuleIR())
OS << Banner << " (function: " << F.getName() << ")\n" << *F.getParent();
else
OS << Banner << static_cast<Value &>(F);
}
return PreservedAnalyses::all();
}

Expand Down

0 comments on commit 79df7df

Please sign in to comment.