summaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2019-08-22 09:07:25 +0000
committerHans Wennborg <hans@hanshq.net>2019-08-22 09:07:25 +0000
commit91ea65af1a4cb1a62ea08a2bc6da7300a4671db7 (patch)
treea81d42d81d999e410a5057ec57b1cb4485b147ca /lib/CodeGen
parentc73c63173e6f657bd5ebe6fc87c4e362e31cbd7e (diff)
downloadclang-91ea65af1a4cb1a62ea08a2bc6da7300a4671db7.tar.gz
Revert r369458 "[DebugInfo] Add debug location to dynamic atexit destructor"
It causes the build to fail with "inlinable function call in a function with debug info must have a !dbg location" in Chromium. See llvm-commits thread for more info. (This also reverts the follow-up in r369474.) > Fixes PR43012 > > Differential Revision: https://reviews.llvm.org/D66328 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369633 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp3
-rw-r--r--lib/CodeGen/CGDeclCXX.cpp2
2 files changed, 1 insertions, 4 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 49337936eb..422fbc1e29 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -3564,8 +3564,7 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, SourceLocation Loc,
if (Name.startswith("\01"))
Name = Name.substr(1);
- if (!HasDecl || D->isImplicit() || D->hasAttr<ArtificialAttr>() ||
- (isa<VarDecl>(D) && GD.getDynamicInitKind() == DynamicInitKind::AtExit)) {
+ if (!HasDecl || D->isImplicit() || D->hasAttr<ArtificialAttr>()) {
Flags |= llvm::DINode::FlagArtificial;
// Artificial functions should not silently reuse CurLoc.
CurLoc = SourceLocation();
diff --git a/lib/CodeGen/CGDeclCXX.cpp b/lib/CodeGen/CGDeclCXX.cpp
index f7b1e38972..7a0605b845 100644
--- a/lib/CodeGen/CGDeclCXX.cpp
+++ b/lib/CodeGen/CGDeclCXX.cpp
@@ -247,8 +247,6 @@ llvm::Function *CodeGenFunction::createAtExitStub(const VarDecl &VD,
CGF.StartFunction(GlobalDecl(&VD, DynamicInitKind::AtExit),
CGM.getContext().VoidTy, fn, FI, FunctionArgList());
- // Emit an artificial location for this function.
- auto AL = ApplyDebugLocation::CreateArtificial(CGF);
llvm::CallInst *call = CGF.Builder.CreateCall(dtor, addr);