[clang] 8d9ddd4 - DebugInfo: STN: Handle unreconstitutable types in function types
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 23 21:14:48 PDT 2021
Author: David Blaikie
Date: 2021-09-23T21:13:16-07:00
New Revision: 8d9ddd4f509c54d05a38427d7999c061d88ca35c
URL: https://github.com/llvm/llvm-project/commit/8d9ddd4f509c54d05a38427d7999c061d88ca35c
DIFF: https://github.com/llvm/llvm-project/commit/8d9ddd4f509c54d05a38427d7999c061d88ca35c.diff
LOG: DebugInfo: STN: Handle unreconstitutable types in function types
Added:
Modified:
clang/lib/CodeGen/CGDebugInfo.cpp
clang/test/CodeGenCXX/debug-info-simple-template-names.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 7119402dcb64..100ce695f86b 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -4881,7 +4881,7 @@ struct ReconstitutableType : public RecursiveASTVisitor<ReconstitutableType> {
bool VisitFunctionProtoType(FunctionProtoType *FT) {
// noexcept is not encoded in DWARF, so the reversi
Reconstitutable &= !isNoexceptExceptionSpec(FT->getExceptionSpecType());
- return !Reconstitutable;
+ return Reconstitutable;
}
bool TraverseRecordType(RecordType *RT) {
// Unnamed classes/lambdas can't be reconstituted due to a lack of column
diff --git a/clang/test/CodeGenCXX/debug-info-simple-template-names.cpp b/clang/test/CodeGenCXX/debug-info-simple-template-names.cpp
index 98109bc93f00..be290b3b97e5 100644
--- a/clang/test/CodeGenCXX/debug-info-simple-template-names.cpp
+++ b/clang/test/CodeGenCXX/debug-info-simple-template-names.cpp
@@ -55,6 +55,8 @@ void f() {
} unnamed_struct;
f1<decltype(unnamed_struct)>();
// CHECK: !DISubprogram(name: "f1<(unnamed struct at {{.*}}debug-info-simple-template-names.cpp:[[# @LINE - 3]]:3)>",
+ f1<void (decltype(unnamed_struct))>();
+ // CHECK: !DISubprogram(name: "f1<void ((unnamed struct at {{.*}}CodeGenCXX/debug-info-simple-template-names.cpp:[[# @LINE - 5]]:3))>",
enum {} unnamed_enum;
f1<decltype(unnamed_enum)>();
// CHECK: !DISubprogram(name: "f1<(unnamed enum at {{.*}}debug-info-simple-template-names.cpp:[[# @LINE - 2]]:3)>",
More information about the cfe-commits
mailing list