[cfe-commits] r41424 - /cfe/trunk/CodeGen/CGExpr.cpp
Chris Lattner
sabre at nondot.org
Sat Aug 25 22:06:41 PDT 2007
Author: lattner
Date: Sun Aug 26 00:06:40 2007
New Revision: 41424
URL: http://llvm.org/viewvc/llvm-project?rev=41424&view=rev
Log:
tolerate unimplemented codegen better
Modified:
cfe/trunk/CodeGen/CGExpr.cpp
Modified: cfe/trunk/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CGExpr.cpp?rev=41424&r1=41423&r2=41424&view=diff
==============================================================================
--- cfe/trunk/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/CodeGen/CGExpr.cpp Sun Aug 26 00:06:40 2007
@@ -211,11 +211,12 @@
///
LValue CodeGenFunction::EmitLValue(const Expr *E) {
switch (E->getStmtClass()) {
- default:
+ default: {
fprintf(stderr, "Unimplemented lvalue expr!\n");
E->dump();
- return LValue::MakeAddr(llvm::UndefValue::get(
- llvm::PointerType::get(llvm::Type::Int32Ty)));
+ llvm::Type *Ty = llvm::PointerType::get(ConvertType(E->getType()));
+ return LValue::MakeAddr(llvm::UndefValue::get(Ty));
+ }
case Expr::DeclRefExprClass: return EmitDeclRefLValue(cast<DeclRefExpr>(E));
case Expr::ParenExprClass:return EmitLValue(cast<ParenExpr>(E)->getSubExpr());
More information about the cfe-commits
mailing list