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 | 20937be183edb5f7af418dc6614b27423c071106 (patch) | |
| tree | 69fc2cfc9bd1a58a7ce7879a7221d6a463d79307 /clang/lib/CodeGen | |
| parent | 2221aba85b57297538510708e02ee217a2656baf (diff) | |
| download | bcm5719-llvm-20937be183edb5f7af418dc6614b27423c071106.tar.gz bcm5719-llvm-20937be183edb5f7af418dc6614b27423c071106.zip | |
DebugInfo: Suppress the location of instructions in complex default arguments.
llvm-svn: 228589
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGExprComplex.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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<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, |

