diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-01-21 23:08:17 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-01-21 23:08:17 +0000 |
commit | 835afb205fea08f80c5eb24aba01b81f77e64cc3 (patch) | |
tree | 84c9b08b6613af015ea0558d9a9146655db4562e /clang/lib/CodeGen/CGExpr.cpp | |
parent | fcf053b342c1319b6ea9a8a7d65b3ecc83a93999 (diff) | |
download | bcm5719-llvm-835afb205fea08f80c5eb24aba01b81f77e64cc3.tar.gz bcm5719-llvm-835afb205fea08f80c5eb24aba01b81f77e64cc3.zip |
DebugInfo: Remove forced column-info workaround for inlined calls
This workaround was to provide unique call sites to ensure LLVM's inline
debug info handling would properly unique two calls to the same function
on the same line. Instead, this has now been fixed in LLVM (r226736) and
the workaround here can be removed.
Originally committed in r176895, but this isn't a straight revert due to
all the changes since then. I just searched for anything ForcedColumn*
related and removed them.
We could test this - but it didn't strike me as terribly valuable once
we're no longer adding this workaround everything just works as expected
& it's no longer a special case to test for.
llvm-svn: 226738
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index ce7679c836e..5c38bc01718 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -3065,9 +3065,7 @@ RValue CodeGenFunction::EmitCallExpr(const CallExpr *E, // expansion will still get the same line/column and break debug info. It's // possible that LLVM can be fixed to not rely on this uniqueness, at which // point this workaround can be removed. - ApplyDebugLocation DL(*this, E->getLocStart(), - E->getDirectCallee() && - E->getDirectCallee()->isInlineSpecified()); + ApplyDebugLocation DL(*this, E->getLocStart()); // Builtins never have block type. if (E->getCallee()->getType()->isBlockPointerType()) @@ -3328,16 +3326,6 @@ RValue CodeGenFunction::EmitCall(QualType CalleeType, llvm::Value *Callee, const auto *FnType = cast<FunctionType>(cast<PointerType>(CalleeType)->getPointeeType()); - // Force column info to differentiate multiple inlined call sites on - // the same line, analoguous to EmitCallExpr. - // FIXME: This is insufficient. Two calls coming from the same macro expansion - // will still get the same line/column and break debug info. It's possible - // that LLVM can be fixed to not rely on this uniqueness, at which point this - // workaround can be removed. - bool ForceColumnInfo = false; - if (const FunctionDecl* FD = dyn_cast_or_null<const FunctionDecl>(TargetDecl)) - ForceColumnInfo = FD->isInlineSpecified(); - if (getLangOpts().CPlusPlus && SanOpts.has(SanitizerKind::Function) && (!TargetDecl || !isa<FunctionDecl>(TargetDecl))) { if (llvm::Constant *PrefixSig = @@ -3386,8 +3374,7 @@ RValue CodeGenFunction::EmitCall(QualType CalleeType, llvm::Value *Callee, Args.add(RValue::get(Builder.CreateBitCast(Chain, CGM.VoidPtrTy)), CGM.getContext().VoidPtrTy); EmitCallArgs(Args, dyn_cast<FunctionProtoType>(FnType), E->arg_begin(), - E->arg_end(), E->getDirectCallee(), /*ParamsToSkip*/ 0, - ForceColumnInfo); + E->arg_end(), E->getDirectCallee(), /*ParamsToSkip*/ 0); const CGFunctionInfo &FnInfo = CGM.getTypes().arrangeFreeFunctionCall( Args, FnType, /*isChainCall=*/Chain); |