Handle ImplicitValueInitExpr in AggExprEmitter.

llvm-svn: 91519
This commit is contained in:
Anders Carlsson 2009-12-16 06:57:54 +00:00
parent 8b8d01829e
commit 18ada9856f
2 changed files with 14 additions and 2 deletions

View File

@ -106,6 +106,7 @@ public:
void VisitConditionalOperator(const ConditionalOperator *CO);
void VisitChooseExpr(const ChooseExpr *CE);
void VisitInitListExpr(InitListExpr *E);
void VisitImplicitValueInitExpr(ImplicitValueInitExpr *E);
void VisitCXXDefaultArgExpr(CXXDefaultArgExpr *DAE) {
Visit(DAE->getExpr());
}
@ -465,8 +466,13 @@ void AggExprEmitter::VisitCXXExprWithTemporaries(CXXExprWithTemporaries *E) {
}
void AggExprEmitter::VisitCXXZeroInitValueExpr(CXXZeroInitValueExpr *E) {
LValue lvalue = LValue::MakeAddr(DestPtr, Qualifiers());
EmitNullInitializationToLValue(lvalue, E->getType());
LValue LV = LValue::MakeAddr(DestPtr, Qualifiers());
EmitNullInitializationToLValue(LV, E->getType());
}
void AggExprEmitter::VisitImplicitValueInitExpr(ImplicitValueInitExpr *E) {
LValue LV = LValue::MakeAddr(DestPtr, Qualifiers());
EmitNullInitializationToLValue(LV, E->getType());
}
void AggExprEmitter::EmitInitializationToLValue(Expr* E, LValue LV) {

View File

@ -90,3 +90,9 @@ A* t10() {
return new(1, 2, 3.45, 100) A;
}
struct B { };
void t11() {
// CHECK: call i8* @_Znwm
// CHECK: call void @llvm.memset.i64(
B* b = new B();
}