diff options
author | Devang Patel <dpatel@apple.com> | 2011-03-04 18:54:42 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-03-04 18:54:42 +0000 |
commit | d3a6b0f184fee2c1b35d226811d347852f8c3656 (patch) | |
tree | ce0179a5500e7099d0daec5168a5d0545fb9db38 /clang/lib/CodeGen/CGExpr.cpp | |
parent | 22b69db8dddde3d5c22b4e70b69f0fc22e3323c2 (diff) | |
download | bcm5719-llvm-d3a6b0f184fee2c1b35d226811d347852f8c3656.tar.gz bcm5719-llvm-d3a6b0f184fee2c1b35d226811d347852f8c3656.zip |
Emit a stop point before a call expression so that debugger has some chance of getting some footing when user wants to stop at 2nd bar() in following expression when all function calls are inlined.
= bar() + ... + bar() + ...
clang keeps track of column numbers, so we could put location entries for all subexpressions but that will significantly bloat debug info in general, but a location for call expression is helpful here.
llvm-svn: 127018
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 0f9abc7c351..e23d6107c0b 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -15,6 +15,7 @@ #include "CodeGenModule.h" #include "CGCall.h" #include "CGCXXABI.h" +#include "CGDebugInfo.h" #include "CGRecordLayout.h" #include "CGObjCRuntime.h" #include "clang/AST/ASTContext.h" @@ -1936,6 +1937,12 @@ LValue CodeGenFunction::EmitOpaqueValueLValue(const OpaqueValueExpr *e) { RValue CodeGenFunction::EmitCallExpr(const CallExpr *E, ReturnValueSlot ReturnValue) { + if (CGDebugInfo *DI = getDebugInfo()) { + DI->setLocation(E->getLocStart()); + DI->UpdateLineDirectiveRegion(Builder); + DI->EmitStopPoint(Builder); + } + // Builtins never have block type. if (E->getCallee()->getType()->isBlockPointerType()) return EmitBlockCallExpr(E, ReturnValue); |