diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-02-14 12:18:48 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-02-14 12:18:48 +0000 |
commit | ec12bbe359799efc32df6bde5e872cb2713c0b19 (patch) | |
tree | dfd4e4f0fa9ce6e010e098662d5f00a37c9ff0e3 /lib/CodeGen/CGExprScalar.cpp | |
parent | 9e435806aaf5bd7e974d317ef247f200200ad686 (diff) |
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index a9cbf05da1045..3be14c8c3ee60 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -3393,11 +3393,12 @@ Value *CodeGenFunction::EmitScalarExpr(const Expr *E, bool IgnoreResultAssign) { assert(E && hasScalarEvaluationKind(E->getType()) && "Invalid scalar expression to emit"); + bool hasDebugInfo = getDebugInfo(); if (isa<CXXDefaultArgExpr>(E)) disableDebugInfo(); Value *V = ScalarExprEmitter(*this, IgnoreResultAssign) .Visit(const_cast<Expr*>(E)); - if (isa<CXXDefaultArgExpr>(E)) + if (isa<CXXDefaultArgExpr>(E) && hasDebugInfo) enableDebugInfo(); return V; } |