va_end fix
authorAndrew Lenharth <andrewl@lenharth.org>
Sun, 19 Jun 2005 14:04:55 +0000 (14:04 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Sun, 19 Jun 2005 14:04:55 +0000 (14:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22262 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/llvmAsmParser.y
lib/Bytecode/Reader/ReaderWrappers.cpp

index 46dd988bd345f3e282ccb7e2dbfb593372e9568a..94d6edf5c54e9b2cbc74a63494d1124bc7bf9fa9 100644 (file)
@@ -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);
       }
index 8d1f3849861a6e08ae50e2a8146dffe13cf8f6d5..c000c9a3f59291e907b28e556cd794af2e2b1957 100644 (file)
@@ -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);
       }