summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-11-21 00:09:21 +0000
committerBill Wendling <isanbard@gmail.com>2008-11-21 00:09:21 +0000
commitf5260d29c28cd28d0206707bb60f6cf1b2135e27 (patch)
tree7e2a47b225737da8a84efac6de86476953227768 /llvm/lib/Transforms
parent26c6a3e736d3aa51c3e27789b381563c481d5ceb (diff)
downloadbcm5719-llvm-f5260d29c28cd28d0206707bb60f6cf1b2135e27.tar.gz
bcm5719-llvm-f5260d29c28cd28d0206707bb60f6cf1b2135e27.zip
Fix error where it wasn't getting the correct caller function.
llvm-svn: 59758
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/Inliner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index bf0925c2e2f..f97fce6e06c 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/lib/Transforms/IPO/Inliner.cpp
@@ -54,11 +54,12 @@ static bool InlineCallIfPossible(CallSite CS, CallGraph &CG,
const std::set<Function*> &SCCFunctions,
const TargetData &TD) {
Function *Callee = CS.getCalledFunction();
+ Function *Caller = CS.getCaller();
+
if (!InlineFunction(CS, &CG, &TD)) return false;
// If the inlined function had a higher stack protection level than the
// calling function, then bump up the caller's stack protection level.
- Function *Caller = CS.getCaller();
if (Callee->hasFnAttr(Attribute::StackProtectReq))
Caller->addFnAttr(Attribute::StackProtectReq);
else if (Callee->hasFnAttr(Attribute::StackProtect) &&
OpenPOWER on IntegriCloud