diff options
-rw-r--r-- | clang/include/clang/AST/ExprCXX.h | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 2 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/debug-info-line.cpp | 6 |
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 |