| Index: lib/CodeGen/CGExprAgg.cpp
|
| diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
|
| index 9d0f3a9661a68d3f58c60365e1ee59f2becdc606..ea366ddabcb86dcaa630d2ae44df38eecfd2dfe8 100644
|
| --- a/lib/CodeGen/CGExprAgg.cpp
|
| +++ b/lib/CodeGen/CGExprAgg.cpp
|
| @@ -928,7 +928,11 @@ void AggExprEmitter::VisitVAArgExpr(VAArgExpr *VE) {
|
| llvm::Value *ArgPtr = CGF.EmitVAArg(ArgValue, VE->getType());
|
|
|
| if (!ArgPtr) {
|
| - CGF.ErrorUnsupported(VE, "aggregate va_arg expression");
|
| + // If EmitVAArg fails, we fall back to the LLVM instruction.
|
| + llvm::Value *Val =
|
| + Builder.CreateVAArg(ArgValue, CGF.ConvertType(VE->getType()));
|
| + if (!Dest.isIgnored())
|
| + Builder.CreateStore(Val, Dest.getAddr());
|
| return;
|
| }
|
|
|
|
|