diff options
author | Adrian Prantl <aprantl@apple.com> | 2013-03-15 17:09:05 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2013-03-15 17:09:05 +0000 |
commit | 5acf8a3ac5b7e1e6542716400f6c6e93615462c9 (patch) | |
tree | b0ad2cb478ced79557280e8a60e0011244358861 /clang/lib/CodeGen/CGExpr.cpp | |
parent | 1c150a0d0d02b6541f3ac4857af9923ee8195938 (diff) | |
download | bcm5719-llvm-5acf8a3ac5b7e1e6542716400f6c6e93615462c9.tar.gz bcm5719-llvm-5acf8a3ac5b7e1e6542716400f6c6e93615462c9.zip |
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.)
llvm-svn: 177164
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index e551343119e..ad69ebe05f7 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/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. |