From 74bfe1069dd02c30239bc4d72eb684b248ed3f08 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@228589 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprComplex.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CGExprComplex.cpp') diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp index b6adbf64f8..b4c652c3d8 100644 --- a/lib/CodeGen/CGExprComplex.cpp +++ b/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.1