diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 8299d45ece76f..1489b5116e6ce 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -5869,15 +5869,6 @@ struct ReconstitutableType : public RecursiveASTVisitor { Reconstitutable = false; return false; } - bool VisitType(Type *T) { - // _BitInt(N) isn't reconstitutable because the bit width isn't encoded in - // the DWARF, only the byte width. - if (T->isBitIntType()) { - Reconstitutable = false; - return false; - } - return true; - } bool TraverseEnumType(EnumType *ET, bool = false) { // Unnamed enums can't be reconstituted due to a lack of column info we // produce in the DWARF, so we can't get Clang's full name back. diff --git a/clang/test/DebugInfo/CXX/simple-template-names.cpp b/clang/test/DebugInfo/CXX/simple-template-names.cpp index 5a5d706e81972..3c8ff2780b66a 100644 --- a/clang/test/DebugInfo/CXX/simple-template-names.cpp +++ b/clang/test/DebugInfo/CXX/simple-template-names.cpp @@ -114,12 +114,28 @@ void f() { f3(); // CHECK: !DISubprogram(name: "_STN|f3|", - + f1<_BitInt(3)>(); - // CHECK: !DISubprogram(name: "f1<_BitInt(3)>", + // CHECK: !DISubprogram(name: "_STN|f1|<_BitInt(3)>", f1(); - // CHECK: !DISubprogram(name: "f1", + // CHECK: !DISubprogram(name: "_STN|f1|", + + f1<_BitInt(120)>(); + // CHECK: !DISubprogram(name: "_STN|f1|<_BitInt(120)>", + + f1(); + // CHECK: !DISubprogram(name: "_STN|f1|", + + f2<_BitInt(2), 1>(); + // CHECK: !DISubprogram(name: "_STN|f2|<_BitInt(2), (_BitInt(2))1>", + + f2<_BitInt(64), 12>(); + // CHECK: !DISubprogram(name: "_STN|f2|<_BitInt(64), (_BitInt(64))12>", + + // FIXME: make block forms reconstitutable + f2<_BitInt(65), 1>(); +// CHECK: !DISubprogram(name: "f2<_BitInt(65), (_BitInt(65))1>", // Add a parameter just so this differs from other attributed function types // that don't mangle differently.