forked from OSchip/llvm-project
Handle ImplicitValueInitExpr in AggExprEmitter.
llvm-svn: 91519
This commit is contained in:
parent
8b8d01829e
commit
18ada9856f
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue