summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp')
-rw-r--r--contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp
index a9cbf05..3be14c8 100644
--- a/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/contrib/llvm/tools/clang/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;
}
OpenPOWER on IntegriCloud