diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2008-10-29 04:39:20 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2008-10-29 04:39:20 +0000 |
commit | 6a0b9846e60e321b1e295072e3d2d01d8411cc60 (patch) | |
tree | 0cbf19e78002f35373baba0235288a5965551814 | |
parent | 6f2bb36d254239622ab7c4fbb25023871448e2a3 (diff) |
Fix for PR2966: va_start/va_end use the *address* of the
va_list, not the value. Patch fixes an assert on
x86-64 and a wrong-code bug on x86. I'm not completely sure,
but I think it's a regression from r58306.
Does anyone run regression tests regularly on x86-64? The crash should
have been picked up there.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58366 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/CGBuiltin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp index d08d9bc5f2..0032cd38be 100644 --- a/lib/CodeGen/CGBuiltin.cpp +++ b/lib/CodeGen/CGBuiltin.cpp @@ -53,7 +53,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(unsigned BuiltinID, const CallExpr *E) { case Builtin::BI__builtin_stdarg_start: case Builtin::BI__builtin_va_start: case Builtin::BI__builtin_va_end: { - Value *ArgValue = EmitScalarExpr(E->getArg(0)); + Value *ArgValue = EmitLValue(E->getArg(0)).getAddress(); const llvm::Type *DestType = llvm::PointerType::getUnqual(llvm::Type::Int8Ty); if (ArgValue->getType() != DestType) |