summaryrefslogtreecommitdiff
path: root/cross-project-tests
diff options
context:
space:
mode:
authorMichael Buch <michaelbuch12@gmail.com>2025-11-19 22:57:39 +0000
committerGitHub <noreply@github.com>2025-11-19 22:57:39 +0000
commite99c83ff38b006f12b78704c8e9b9751bf100659 (patch)
tree6e58bc976c44d15e8f47c7fe605f8c0414c0590a /cross-project-tests
parent19fe9b477b570fd395a161638c59e66b35d1a9ac (diff)
[llvm][DebugInfo] Add support for _BitInt in DWARFTypePrinter (#168382)
As of recent, LLVM includes the bit-size as a `DW_AT_bit_size` (and as part of `DW_AT_name`) of `_BitInt`s in DWARF. This allows us to mark `_BitInt`s as "reconstitutable" when compiling with `-gsimple-template-names`. However, before doing so we need to make sure the `DWARFTypePrinter` can reconstruct template parameter values that have `_BitInt` type. This patch adds support for printing `DW_TAG_template_value_parameter`s that have `_BitInt` type. Since `-gsimple-template-names` only omits template parameters that are `<= 64` bit wide, we don't support `_BitInt`s larger than 64 bits.
Diffstat (limited to 'cross-project-tests')
-rw-r--r--cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/Inputs/simplified_template_names.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/Inputs/simplified_template_names.cpp b/cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/Inputs/simplified_template_names.cpp
index 344005ee9814..6f7ef16d686e 100644
--- a/cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/Inputs/simplified_template_names.cpp
+++ b/cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/Inputs/simplified_template_names.cpp
@@ -95,6 +95,8 @@ struct t12 {
template <decltype(ns::AnonEnum1)> void f10() {}
+template <typename T, T V> void f11() {}
+
int main() {
struct {
} A;
@@ -239,8 +241,10 @@ int main() {
f1<void(t8)>();
operator_not_really<int>();
t12 v4;
- f1<_BitInt(3)>();
- f1<const unsigned _BitInt(5)>();
+ f11<_BitInt(3), 2>();
+ f11<const unsigned _BitInt(5), 2>();
+ f11<_BitInt(65), 2>();
+ f11<const unsigned _BitInt(65), 2>();
f1<void(t1<>, t1<>)>();
f1<int t1<>::*>();
void fcc() __attribute__((swiftcall));