Revert: [DebugInfo] Add debug location to stubs generated by CGDeclCXX and mark them as artificial
llvm-svn: 371113
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index a9bc86b..e36f6932 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1910,8 +1910,7 @@
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
@@ -1936,7 +1935,6 @@
switch (StubKind) {
case DynamicInitKind::NoStub:
- case DynamicInitKind::GlobalArrayDestructor:
llvm_unreachable("not an initializer");
case DynamicInitKind::Initializer:
OS << "`dynamic initializer for '";
@@ -3571,8 +3569,7 @@
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();