From 6b6a9b3f7b54e1df0976027ab623bafa3d769638 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 15 Mar 2013 17:09:05 +0000 Subject: 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 --- lib/CodeGen/CGExpr.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen/CGExpr.cpp') 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. -- cgit v1.2.3