mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-18 03:37:31 +00:00
va_end fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22262 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
08b06dc956
commit
017fba9d0f
@ -785,6 +785,7 @@ static PATypeHolder HandleUpRefs(const Type *ty) {
|
||||
while (!F->use_empty()) {
|
||||
CallInst* CI = cast<CallInst>(F->use_back());
|
||||
AllocaInst* bar = new AllocaInst(ArgTy, 0, "vaend.fix.1", CI);
|
||||
new StoreInst(CI->getOperand(1), bar, CI);
|
||||
new CallInst(NF, bar, "", CI);
|
||||
CI->getParent()->getInstList().erase(CI);
|
||||
}
|
||||
|
@ -209,6 +209,7 @@ static ModuleProvider* CheckVarargs(ModuleProvider* MP) {
|
||||
for(Value::use_iterator I = F->use_begin(), E = F->use_end(); I != E;)
|
||||
if (CallInst* CI = dyn_cast<CallInst>(*I++)) {
|
||||
AllocaInst* bar = new AllocaInst(ArgTy, 0, "vaend.fix.1", CI);
|
||||
new StoreInst(CI->getOperand(1), bar, CI);
|
||||
new CallInst(NF, bar, "", CI);
|
||||
CI->getParent()->getInstList().erase(CI);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user