File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,9 @@ class PCHContainerGenerator : public ASTConsumer {
84
84
if (!TD->isCompleteDefinition ())
85
85
return true ;
86
86
87
+ if (D->hasAttr <NoDebugAttr>())
88
+ return true ;
89
+
87
90
QualType QualTy = Ctx.getTypeDeclType (D);
88
91
if (!QualTy.isNull () && CanRepresent (QualTy.getTypePtr ()))
89
92
DI.getOrCreateStandaloneType (QualTy, D->getLocation ());
Original file line number Diff line number Diff line change
1
+ // REQUIRES: asserts
2
+
3
+ // RUN: %clang_cc1 -std=c++23 -x c++-header -emit-pch -fmodule-format=obj \
4
+ // RUN: -o %t.pch %s \
5
+ // RUN: -mllvm -debug-only=pchcontainer &>%t-pch.ll
6
+ // RUN: cat %t-pch.ll | FileCheck %s
7
+
8
+ template <class ...>
9
+ using __void_t [[gnu::nodebug]] = void ;
10
+
11
+ __void_t <> func () {}
12
+
13
+ // CHECK: !DICompileUnit
14
+ // CHECK-NOT: __void_t
You can’t perform that action at this time.
0 commit comments