[cfe-commits] r41441 - /cfe/trunk/CodeGen/CGDecl.cpp
Chris Lattner
sabre at nondot.org
Sun Aug 26 00:29:24 PDT 2007
Author: lattner
Date: Sun Aug 26 02:29:23 2007
New Revision: 41441
URL: http://llvm.org/viewvc/llvm-project?rev=41441&view=rev
Log:
implement a fixme, add a couple more :)
Modified:
cfe/trunk/CodeGen/CGDecl.cpp
Modified: cfe/trunk/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CGDecl.cpp?rev=41441&r1=41440&r2=41441&view=diff
==============================================================================
--- cfe/trunk/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/CodeGen/CGDecl.cpp Sun Aug 26 02:29:23 2007
@@ -85,11 +85,15 @@
// If this local has an initializer, emit it now.
if (const Expr *Init = D.getInit()) {
- if (Init->getType()->isComplexType()) {
+ if (!hasAggregateLLVMType(Init->getType())) {
+ llvm::Value *V = EmitScalarExpr(Init);
+ // FIXME: Handle volatile.
+ Builder.CreateStore(V, DeclPtr);
+ } else if (Init->getType()->isComplexType()) {
EmitComplexExprIntoAddr(Init, DeclPtr);
} else {
- // FIXME: This could be much better for aggregates.
- EmitStoreThroughLValue(EmitAnyExpr(Init), LValue::MakeAddr(DeclPtr), Ty);
+ // FIXME: Handle volatile.
+ EmitAggExpr(Init, DeclPtr, false);
}
}
}
More information about the cfe-commits
mailing list