forked from OSchip/llvm-project
Prevent a segfault for vaarg expressions on unsupported architectures.
llvm-svn: 62008
This commit is contained in:
parent
519976c4e9
commit
020cddcfee
|
@ -278,9 +278,11 @@ void AggExprEmitter::VisitVAArgExpr(VAArgExpr *VE) {
|
|||
llvm::Value *ArgValue = CGF.EmitLValue(VE->getSubExpr()).getAddress();
|
||||
llvm::Value *ArgPtr = CGF.EmitVAArg(ArgValue, VE->getType());
|
||||
|
||||
if (!ArgPtr)
|
||||
if (!ArgPtr) {
|
||||
CGF.ErrorUnsupported(VE, "aggregate va_arg expression");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (DestPtr)
|
||||
// FIXME: volatility
|
||||
CGF.EmitAggregateCopy(DestPtr, ArgPtr, VE->getType());
|
||||
|
|
Loading…
Reference in New Issue