summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-01-25 01:25:37 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-01-25 01:25:37 +0000
commit9f7ae2c9484431ad9caa4357b5109f90c166edd0 (patch)
treefa18d0810dce019769b5f11f93d1e22bb1217af1
parent9b47966615cf71b296538ec9b4333b498ea695b7 (diff)
downloadbcm5719-llvm-9f7ae2c9484431ad9caa4357b5109f90c166edd0.tar.gz
bcm5719-llvm-9f7ae2c9484431ad9caa4357b5109f90c166edd0.zip
DebugInfo: Attribute calls to overloaded operators with the operator, not the start of the whole expression
llvm-svn: 227028
-rw-r--r--clang/include/clang/AST/ExprCXX.h2
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp2
-rw-r--r--clang/test/CodeGenCXX/debug-info-line.cpp6
3 files changed, 6 insertions, 4 deletions
diff --git a/clang/include/clang/AST/ExprCXX.h b/clang/include/clang/AST/ExprCXX.h
index 176817823ea..db00445f689 100644
--- a/clang/include/clang/AST/ExprCXX.h
+++ b/clang/include/clang/AST/ExprCXX.h
@@ -86,6 +86,8 @@ public:
/// of the right bracket.
SourceLocation getOperatorLoc() const { return getRParenLoc(); }
+ SourceLocation getExprLoc() const LLVM_READONLY { return getOperatorLoc(); }
+
SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); }
SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
SourceRange getSourceRange() const { return Range; }
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 3a45d77e2c2..568f949c342 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -3060,8 +3060,6 @@ RValue CodeGenFunction::EmitRValueForField(LValue LV,
RValue CodeGenFunction::EmitCallExpr(const CallExpr *E,
ReturnValueSlot ReturnValue) {
- ApplyDebugLocation DL(*this, E);
-
// Builtins never have block type.
if (E->getCallee()->getType()->isBlockPointerType())
return EmitBlockCallExpr(E, ReturnValue);
diff --git a/clang/test/CodeGenCXX/debug-info-line.cpp b/clang/test/CodeGenCXX/debug-info-line.cpp
index 340222eba5b..a23c242a228 100644
--- a/clang/test/CodeGenCXX/debug-info-line.cpp
+++ b/clang/test/CodeGenCXX/debug-info-line.cpp
@@ -74,9 +74,11 @@ agg agg_src();
// CHECK-LABEL: define
void f6() {
agg x;
+ // CHECK: call void @llvm.memcpy{{.*}} !dbg [[DBG_F6:!.*]]
+ x
#line 700
- x // CHECK: call void @llvm.memcpy{{.*}} !dbg [[DBG_F6:!.*]]
- = agg_src();
+ = //
+ agg_src();
}
// CHECK-LABEL: define
OpenPOWER on IntegriCloud