diff options
| author | David Blaikie <dblaikie@gmail.com> | 2015-01-18 00:14:21 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2015-01-18 00:14:21 +0000 |
| commit | 7d2a2ac57b3485ec7330ee42dc7984751a7bdfde (patch) | |
| tree | 9444d9f9d13b13346cbb879f0fdadc4a9a819241 /clang/lib | |
| parent | a81d410d4f397a35054f4056ee4c032b6b43c1d1 (diff) | |
| download | bcm5719-llvm-7d2a2ac57b3485ec7330ee42dc7984751a7bdfde.tar.gz bcm5719-llvm-7d2a2ac57b3485ec7330ee42dc7984751a7bdfde.zip | |
Recommit r225083 (reverted in r225361) now that calls to aggregate initializers from in class non-static data members are explicitly attributed to the desired line.
The code setting the debug location being removed here was accidentally
leaking a location into the call to the non-static data member's ctor
call. Without it the call had no location and could cause assertion
failures if it was inlined. Now that it has a location (and a correct
one at that) this code should hopefully be no longer needed.
It's possible of course that other parts of the debug info are also
relying on the debug locations being set here to leak to where they're
needed - so we might see the same assertions again & will have to
investigate what the dependence was/is. But the chances are good that
any of those are debug info line table quality bugs we've just not found
yet anyway - so it'll be good to flush them out.
llvm-svn: 226383
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 8 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.h | 3 |
2 files changed, 0 insertions, 11 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 6403fa99aa7..f9b26b62103 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -2680,10 +2680,6 @@ void CodeGenFunction::EmitCallArgs(CallArgList &Args, const FunctionDecl *CalleeDecl, unsigned ParamsToSkip, bool ForceColumnInfo) { - CGDebugInfo *DI = getDebugInfo(); - SourceLocation CallLoc; - if (DI) CallLoc = DI->getLocation(); - // We *have* to evaluate arguments from right to left in the MS C++ ABI, // because arguments are destroyed left to right in the callee. if (CGM.getTarget().getCXXABI().areArgsDestroyedLeftToRightInCallee()) { @@ -2704,8 +2700,6 @@ void CodeGenFunction::EmitCallArgs(CallArgList &Args, EmitCallArg(Args, *Arg, ArgTypes[I]); emitNonNullArgCheck(*this, Args.back().RV, ArgTypes[I], Arg->getExprLoc(), CalleeDecl, ParamsToSkip + I); - // Restore the debug location. - if (DI) DI->EmitLocation(Builder, CallLoc, ForceColumnInfo); } // Un-reverse the arguments we just evaluated so they match up with the LLVM @@ -2720,8 +2714,6 @@ void CodeGenFunction::EmitCallArgs(CallArgList &Args, EmitCallArg(Args, *Arg, ArgTypes[I]); emitNonNullArgCheck(*this, Args.back().RV, ArgTypes[I], Arg->getExprLoc(), CalleeDecl, ParamsToSkip + I); - // Restore the debug location. - if (DI) DI->EmitLocation(Builder, CallLoc, ForceColumnInfo); } } diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h index 0be032c1d79..8422a1f8e37 100644 --- a/clang/lib/CodeGen/CGDebugInfo.h +++ b/clang/lib/CodeGen/CGDebugInfo.h @@ -222,9 +222,6 @@ public: /// invalid it is ignored. void setLocation(SourceLocation Loc); - /// getLocation - Return the current source location. - SourceLocation getLocation() const { return CurLoc; } - /// EmitLocation - Emit metadata to indicate a change in line/column /// information in the source file. /// \param ForceColumnInfo Assume DebugColumnInfo option is true. |

