diff options
| author | Adrian Prantl <aprantl@apple.com> | 2013-07-26 20:42:57 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2013-07-26 20:42:57 +0000 |
| commit | b0e603c63813c8378e35a75408ab4cefe71e93e2 (patch) | |
| tree | 78b99b34dbfd49c1dccba5751ae873fc2338eae0 /lib/CodeGen/CGExpr.cpp | |
| parent | b28b04407e6ed06431cb58176268ab719e01fae8 (diff) | |
| download | clang-b0e603c63813c8378e35a75408ab4cefe71e93e2.tar.gz clang-b0e603c63813c8378e35a75408ab4cefe71e93e2.tar.bz2 clang-b0e603c63813c8378e35a75408ab4cefe71e93e2.tar.xz | |
Debug Info / EmitCallArgs: arguments may modify the debug location.
Restore it after each argument is emitted. This fixes the scope info for
inlined subroutines inside of function argument expressions. (E.g.,
anything STL).
rdar://problem/12592135
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187240 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
| -rw-r--r-- | lib/CodeGen/CGExpr.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index ad80afd8ba..73824afc17 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -3096,8 +3096,15 @@ RValue CodeGenFunction::EmitCall(QualType CalleeType, llvm::Value *Callee, const FunctionType *FnType = cast<FunctionType>(cast<PointerType>(CalleeType)->getPointeeType()); + // Force column info to differentiate multiple inlined call sites on + // the same line, analoguous to EmitCallExpr. + bool ForceColumnInfo = false; + if (const FunctionDecl* FD = dyn_cast_or_null<const FunctionDecl>(TargetDecl)) + ForceColumnInfo = FD->isInlineSpecified(); + CallArgList Args; - EmitCallArgs(Args, dyn_cast<FunctionProtoType>(FnType), ArgBeg, ArgEnd); + EmitCallArgs(Args, dyn_cast<FunctionProtoType>(FnType), ArgBeg, ArgEnd, + ForceColumnInfo); const CGFunctionInfo &FnInfo = CGM.getTypes().arrangeFreeFunctionCall(Args, FnType); |
