Return 0 if the ConstExprEmitter can't handle an expression.

llvm-svn: 65951
This commit is contained in:
Anders Carlsson 2009-03-03 16:43:34 +00:00
parent b0e25c1ceb
commit 24b1447b19
1 changed files with 1 additions and 3 deletions

View File

@ -40,9 +40,7 @@ public:
//===--------------------------------------------------------------------===// //===--------------------------------------------------------------------===//
llvm::Constant *VisitStmt(Stmt *S) { llvm::Constant *VisitStmt(Stmt *S) {
CGM.ErrorUnsupported(S, "constant expression"); return 0;
QualType T = cast<Expr>(S)->getType();
return llvm::UndefValue::get(CGM.getTypes().ConvertType(T));
} }
llvm::Constant *VisitParenExpr(ParenExpr *PE) { llvm::Constant *VisitParenExpr(ParenExpr *PE) {