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
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)