From 2221aba85b57297538510708e02ee217a2656baf Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 9 Feb 2015 18:47:14 +0000 Subject: DebugInfo: Suppress the location of instructions in aggregate default arguments. Matches the existing code for scalar default arguments. Complex default arguments probably need the same handling too (test/fix to that coming next). llvm-svn: 228588 --- clang/lib/CodeGen/CGExprAgg.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/lib/CodeGen/CGExprAgg.cpp') 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(E)) + disableDebugInfo(); AggExprEmitter(*this, Slot).Visit(const_cast(E)); + if (isa(E) && hasDebugInfo) + enableDebugInfo(); } LValue CodeGenFunction::EmitAggExprToLValue(const Expr *E) { -- cgit v1.2.3