[PATCH] D125839: [gmodules] Skip CXXDeductionGuideDecls when visiting FunctionDecls in DebugTypeVisitor
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 6 12:52:15 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd1346e2ee274: [gmodules] Skip CXXDeductionGuideDecls when visiting FunctionDecls in (authored by ahatanak).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125839/new/
https://reviews.llvm.org/D125839
Files:
clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
clang/test/Modules/Inputs/gmodules-deduction-guide.h
clang/test/Modules/gmodules-deduction-guide.cpp
Index: clang/test/Modules/gmodules-deduction-guide.cpp
===================================================================
--- /dev/null
+++ clang/test/Modules/gmodules-deduction-guide.cpp
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -std=c++2b -x c++-header -emit-pch -fmodule-format=obj -I %S/Inputs \
+// RUN: -o %t.pch %S/Inputs/gmodules-deduction-guide.h \
+// RUN: -mllvm -debug-only=pchcontainer &>%t-pch.ll
+// RUN: cat %t-pch.ll | FileCheck %s
+
+// CHECK: ![[V0:.*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "S<A>",
+// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "Type0",{{.*}}, baseType: ![[V0]])
Index: clang/test/Modules/Inputs/gmodules-deduction-guide.h
===================================================================
--- /dev/null
+++ clang/test/Modules/Inputs/gmodules-deduction-guide.h
@@ -0,0 +1,11 @@
+struct A {
+};
+
+template <class T>
+struct S{
+ S(const A &);
+};
+
+S(const A&) -> S<A>;
+
+typedef decltype(S(A())) Type0;
Index: clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
===================================================================
--- clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
+++ clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
@@ -96,6 +96,10 @@
}
bool VisitFunctionDecl(FunctionDecl *D) {
+ // Skip deduction guides.
+ if (isa<CXXDeductionGuideDecl>(D))
+ return true;
+
if (isa<CXXMethodDecl>(D))
// This is not yet supported. Constructing the `this' argument
// mandates a CodeGenFunction.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125839.434567.patch
Type: text/x-patch
Size: 1543 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220606/4a0bc78a/attachment-0001.bin>
More information about the cfe-commits
mailing list