summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-03-07 18:29:53 +0000
committerDevang Patel <dpatel@apple.com>2011-03-07 18:29:53 +0000
commite65982c8c88c1a591ca87083f5cb572c0da8b042 (patch)
tree4133feb394b61a52892b3ba468b2b97bd58ef0ca /clang/lib/CodeGen/CGExprScalar.cpp
parentcd526fa15ee81c25b6d67ed929f2a0b7b5a3ebba (diff)
downloadbcm5719-llvm-e65982c8c88c1a591ca87083f5cb572c0da8b042.tar.gz
bcm5719-llvm-e65982c8c88c1a591ca87083f5cb572c0da8b042.zip
Do not emit stop point for CXXDefaultArgExpr. It results in suboptimial user experience.
21 int main() { 22 A a; For example, here user would expect to stop at line 22, even if A's constructor leads to a call through CXXDefaultArgExpr. This fixes ostream-defined.exp regression from gdb testsuite. llvm-svn: 127164
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index 6f52a539cf6..911a0ea418d 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -2567,8 +2567,13 @@ Value *CodeGenFunction::EmitScalarExpr(const Expr *E, bool IgnoreResultAssign) {
assert(E && !hasAggregateLLVMType(E->getType()) &&
"Invalid scalar expression to emit");
- return ScalarExprEmitter(*this, IgnoreResultAssign)
+ if (isa<CXXDefaultArgExpr>(E))
+ CGM.disableDebugInfo();
+ Value *V = ScalarExprEmitter(*this, IgnoreResultAssign)
.Visit(const_cast<Expr*>(E));
+ if (isa<CXXDefaultArgExpr>(E))
+ CGM.enableDebugInfo();
+ return V;
}
/// EmitScalarConversion - Emit a conversion from the specified type to the
OpenPOWER on IntegriCloud