summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprAgg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGExprAgg.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprAgg.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp
index 80b16dd5ba3..7d05d48e85d 100644
--- a/clang/lib/CodeGen/CGExprAgg.cpp
+++ b/clang/lib/CodeGen/CGExprAgg.cpp
@@ -1387,7 +1387,12 @@ void CodeGenFunction::EmitAggExpr(const Expr *E, AggValueSlot Slot) {
// Optimize the slot if possible.
CheckAggExprForMemSetUse(Slot, E, *this);
+ bool hasDebugInfo = getDebugInfo();
+ if (isa<CXXDefaultArgExpr>(E))
+ disableDebugInfo();
AggExprEmitter(*this, Slot).Visit(const_cast<Expr*>(E));
+ if (isa<CXXDefaultArgExpr>(E) && hasDebugInfo)
+ enableDebugInfo();
}
LValue CodeGenFunction::EmitAggExprToLValue(const Expr *E) {
OpenPOWER on IntegriCloud