aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/IPO
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
commit1106f2cb38fd150a434b5ebd04b8792809585f7e (patch)
tree0db1556fdf6d634e4260bc9bacfa55c57f4d2373 /lib/Transforms/IPO
parent2ce7f303f44a09519e7f133642fb12130003057f (diff)
downloadexternal_llvm-1106f2cb38fd150a434b5ebd04b8792809585f7e.zip
external_llvm-1106f2cb38fd150a434b5ebd04b8792809585f7e.tar.gz
external_llvm-1106f2cb38fd150a434b5ebd04b8792809585f7e.tar.bz2
Fix error where it wasn't getting the correct caller function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59758 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r--lib/Transforms/IPO/Inliner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp
index bf0925c..f97fce6 100644
--- a/lib/Transforms/IPO/Inliner.cpp
+++ b/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) &&