
Fixes one of the crashes uncovered by https://github.com/llvm/llvm-project/pull/118710 `getOrCreateStandaloneType` asserts that a `DIType` was created for the requested type. If the `Decl` was marked `nodebug`, however, we can't generate debug-info for it, so we would previously trigger the assert. For now keep the assertion around and check the `nodebug` at the callsite.
15 lines
424 B
C++
15 lines
424 B
C++
// REQUIRES: asserts
|
|
|
|
// RUN: %clang_cc1 -std=c++23 -x c++-header -emit-pch -fmodule-format=obj \
|
|
// RUN: -o %t.pch %s \
|
|
// RUN: -mllvm -debug-only=pchcontainer &>%t-pch.ll
|
|
// RUN: cat %t-pch.ll | FileCheck %s
|
|
|
|
template<class...>
|
|
using __void_t [[gnu::nodebug]] = void;
|
|
|
|
__void_t<> func() {}
|
|
|
|
// CHECK: !DICompileUnit
|
|
// CHECK-NOT: __void_t
|