aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2013-03-15 17:09:05 +0000
committerAdrian Prantl <aprantl@apple.com>2013-03-15 17:09:05 +0000
commit6b6a9b3f7b54e1df0976027ab623bafa3d769638 (patch)
tree8556378ee783f6ee8b9d62462c4f5e5cd69666cc /lib/CodeGen/CGExpr.cpp
parenta30bab4b5d421fb148a732da31621cffe51519ee (diff)
Force column info only for direct inlined functions. This should strike
the balance between expected behavior and compatibility with the gdb testsuite. (GDB gets confused if we break an expression into multiple debug stmts so we enable this behavior only for inlined functions. For the full experience people can still use -gcolumn-info.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177164 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index e551343119..ad69ebe05f 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -2857,9 +2857,11 @@ RValue CodeGenFunction::EmitCallExpr(const CallExpr *E,
ReturnValueSlot ReturnValue) {
if (CGDebugInfo *DI = getDebugInfo()) {
SourceLocation Loc = E->getLocStart();
- DI->EmitLocation(Builder, Loc,
- /* Force column info to be generated so we can differentiate
- multiple call sites on the same line in the debug info. */ true);
+ // Force column info to be generated so we can differentiate
+ // multiple call sites on the same line in the debug info.
+ const FunctionDecl* Callee = E->getDirectCallee();
+ bool ForceColumnInfo = Callee && Callee->isInlineSpecified();
+ DI->EmitLocation(Builder, Loc, ForceColumnInfo);
}
// Builtins never have block type.