r227028 - DebugInfo: Attribute calls to overloaded operators with the operator, not the start of the whole expression
David Blaikie
dblaikie at gmail.com
Sat Jan 24 17:25:38 PST 2015
Author: dblaikie
Date: Sat Jan 24 19:25:37 2015
New Revision: 227028
URL: http://llvm.org/viewvc/llvm-project?rev=227028&view=rev
Log:
DebugInfo: Attribute calls to overloaded operators with the operator, not the start of the whole expression
Modified:
cfe/trunk/include/clang/AST/ExprCXX.h
cfe/trunk/lib/CodeGen/CGExpr.cpp
cfe/trunk/test/CodeGenCXX/debug-info-line.cpp
Modified: cfe/trunk/include/clang/AST/ExprCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprCXX.h?rev=227028&r1=227027&r2=227028&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ExprCXX.h (original)
+++ cfe/trunk/include/clang/AST/ExprCXX.h Sat Jan 24 19:25:37 2015
@@ -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; }
Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=227028&r1=227027&r2=227028&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Sat Jan 24 19:25:37 2015
@@ -3060,8 +3060,6 @@ RValue CodeGenFunction::EmitRValueForFie
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);
Modified: cfe/trunk/test/CodeGenCXX/debug-info-line.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-line.cpp?rev=227028&r1=227027&r2=227028&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-line.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-line.cpp Sat Jan 24 19:25:37 2015
@@ -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
More information about the cfe-commits
mailing list