summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorAlexandre Ganea <alexandre.ganea@ubisoft.com>2019-11-15 16:21:17 -0500
committerAlexandre Ganea <alexandre.ganea@ubisoft.com>2019-11-15 16:21:17 -0500
commitcaf3166d40ffbb0d61b29f423318ce6cfbcf4a9f (patch)
tree931330939444c1b58a018e889596a2a62bc9253a /clang/lib/CodeGen/CGDebugInfo.cpp
parent50e99563fb0459f5160572eef3c4e6062b8ad3f2 (diff)
downloadbcm5719-llvm-caf3166d40ffbb0d61b29f423318ce6cfbcf4a9f.tar.gz
bcm5719-llvm-caf3166d40ffbb0d61b29f423318ce6cfbcf4a9f.zip
Revert "re-land [DebugInfo] Add debug location to stubs generated by CGDeclCXX and mark them as artificial"
This reverts commit 9c1baa23526c6d7d06eafefbf82d73bfe9bb3aaf.
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 41459018a3b..75c4b2ae233 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1944,8 +1944,7 @@ StringRef CGDebugInfo::getDynamicInitializerName(const VarDecl *VD,
llvm::Function *InitFn) {
// If we're not emitting codeview, use the mangled name. For Itanium, this is
// arbitrary.
- if (!CGM.getCodeGenOpts().EmitCodeView ||
- StubKind == DynamicInitKind::GlobalArrayDestructor)
+ if (!CGM.getCodeGenOpts().EmitCodeView)
return InitFn->getName();
// Print the normal qualified name for the variable, then break off the last
@@ -1970,7 +1969,6 @@ StringRef CGDebugInfo::getDynamicInitializerName(const VarDecl *VD,
switch (StubKind) {
case DynamicInitKind::NoStub:
- case DynamicInitKind::GlobalArrayDestructor:
llvm_unreachable("not an initializer");
case DynamicInitKind::Initializer:
OS << "`dynamic initializer for '";
@@ -3646,8 +3644,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::NoStub)) {
+ if (!HasDecl || D->isImplicit() || D->hasAttr<ArtificialAttr>()) {
Flags |= llvm::DINode::FlagArtificial;
// Artificial functions should not silently reuse CurLoc.
CurLoc = SourceLocation();
OpenPOWER on IntegriCloud