diff options
| author | David Blaikie <dblaikie@gmail.com> | 2015-02-09 18:55:57 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2015-02-09 18:55:57 +0000 |
| commit | 74bfe1069dd02c30239bc4d72eb684b248ed3f08 (patch) | |
| tree | 46343c325a59f5c3161a2dd3f53c10bf364e8e96 /lib/CodeGen/CGExprComplex.cpp | |
| parent | 40a73dbd40a7a7813c7bbd0ada5b9561418c800b (diff) | |
| download | clang-74bfe1069dd02c30239bc4d72eb684b248ed3f08.tar.gz | |
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
Diffstat (limited to 'lib/CodeGen/CGExprComplex.cpp')
| -rw-r--r-- | lib/CodeGen/CGExprComplex.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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<Expr*>(E)); + bool hasDebugInfo = getDebugInfo(); + if (isa<CXXDefaultArgExpr>(E)) + disableDebugInfo(); + auto R = ComplexExprEmitter(*this, IgnoreReal, IgnoreImag) + .Visit(const_cast<Expr *>(E)); + if (isa<CXXDefaultArgExpr>(E) && hasDebugInfo) + enableDebugInfo(); + return R; } void CodeGenFunction::EmitComplexExprIntoLValue(const Expr *E, LValue dest, |
