[cfe-commits] r62008 - /cfe/trunk/lib/CodeGen/CGExprAgg.cpp
Sebastian Redl
sebastian.redl at getdesigned.at
Fri Jan 9 13:09:38 PST 2009
Author: cornedbee
Date: Fri Jan 9 15:09:38 2009
New Revision: 62008
URL: http://llvm.org/viewvc/llvm-project?rev=62008&view=rev
Log:
Prevent a segfault for vaarg expressions on unsupported architectures.
Modified:
cfe/trunk/lib/CodeGen/CGExprAgg.cpp
Modified: cfe/trunk/lib/CodeGen/CGExprAgg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprAgg.cpp?rev=62008&r1=62007&r2=62008&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprAgg.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprAgg.cpp Fri Jan 9 15:09:38 2009
@@ -278,9 +278,11 @@
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());
More information about the cfe-commits
mailing list