mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
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
This commit is contained in:
parent
8c1604e7d6
commit
66c75aaa02
@ -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) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user