diff options
author | Devang Patel <dpatel@apple.com> | 2011-03-07 18:29:53 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-03-07 18:29:53 +0000 |
commit | e65982c8c88c1a591ca87083f5cb572c0da8b042 (patch) | |
tree | 4133feb394b61a52892b3ba468b2b97bd58ef0ca /clang/lib/CodeGen/CGExprScalar.cpp | |
parent | cd526fa15ee81c25b6d67ed929f2a0b7b5a3ebba (diff) | |
download | bcm5719-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.cpp | 7 |
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 |