mirror of
https://github.com/intel/llvm.git
synced 2026-01-27 06:06:34 +08:00
Prevent a segfault for vaarg expressions on unsupported architectures.
llvm-svn: 62008
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user