From 20937be183edb5f7af418dc6614b27423c071106 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 9 Feb 2015 18:55:57 +0000 Subject: DebugInfo: Suppress the location of instructions in complex default arguments. llvm-svn: 228589 --- clang/lib/CodeGen/CGExprComplex.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'clang/lib/CodeGen') diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp index b6adbf64f82..b4c652c3d8b 100644 --- a/clang/lib/CodeGen/CGExprComplex.cpp +++ b/clang/lib/CodeGen/CGExprComplex.cpp @@ -1033,8 +1033,14 @@ ComplexPairTy CodeGenFunction::EmitComplexExpr(const Expr *E, bool IgnoreReal, assert(E && getComplexType(E->getType()) && "Invalid complex expression to emit"); - return ComplexExprEmitter(*this, IgnoreReal, IgnoreImag) - .Visit(const_cast(E)); + bool hasDebugInfo = getDebugInfo(); + if (isa(E)) + disableDebugInfo(); + auto R = ComplexExprEmitter(*this, IgnoreReal, IgnoreImag) + .Visit(const_cast(E)); + if (isa(E) && hasDebugInfo) + enableDebugInfo(); + return R; } void CodeGenFunction::EmitComplexExprIntoLValue(const Expr *E, LValue dest, -- cgit v1.2.3