[cfe-commits] r58366 - /cfe/trunk/lib/CodeGen/CGBuiltin.cpp
Eli Friedman
eli.friedman at gmail.com
Tue Oct 28 21:39:20 PDT 2008
Author: efriedma
Date: Tue Oct 28 23:39:20 2008
New Revision: 58366
URL: http://llvm.org/viewvc/llvm-project?rev=58366&view=rev
Log:
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.
Modified:
cfe/trunk/lib/CodeGen/CGBuiltin.cpp
Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=58366&r1=58365&r2=58366&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Tue Oct 28 23:39:20 2008
@@ -53,7 +53,7 @@
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)
More information about the cfe-commits
mailing list