summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2015-07-19 15:48:07 +0000
committerYaron Keren <yaron.keren@gmail.com>2015-07-19 15:48:07 +0000
commitc66c06b899340e436f397c0addab377437fcd171 (patch)
treec4859b00a296da18d630e145630b99399b5b3f43 /llvm/lib/Transforms/IPO
parente2c244f3b4f775a1773e05fed38010adbed32836 (diff)
downloadbcm5719-llvm-c66c06b899340e436f397c0addab377437fcd171.tar.gz
bcm5719-llvm-c66c06b899340e436f397c0addab377437fcd171.zip
Narrow Callee scope, suggestion from David Blaikie.
llvm-svn: 242644
Diffstat (limited to 'llvm/lib/Transforms/IPO')
-rw-r--r--llvm/lib/Transforms/IPO/Inliner.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index 0509eed283c..09fd11d652e 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/lib/Transforms/IPO/Inliner.cpp
@@ -469,9 +469,9 @@ bool Inliner::runOnSCC(CallGraphSCC &SCC) {
// If this is a direct call to an external function, we can never inline
// it. If it is an indirect call, inlining may resolve it to be a
// direct call, so we keep it.
- Function *Callee = CS.getCalledFunction();
- if (Callee && Callee->isDeclaration())
- continue;
+ if (Function *Callee = CS.getCalledFunction())
+ if (Callee->isDeclaration())
+ continue;
CallSites.push_back(std::make_pair(CS, -1));
}
OpenPOWER on IntegriCloud