diff options
author | Michael Buch <michaelbuch12@gmail.com> | 2022-12-13 12:15:09 +0000 |
---|---|---|
committer | Michael Buch <michaelbuch12@gmail.com> | 2022-12-16 11:38:52 +0000 |
commit | 8d3843badb8a32a56531e383a2a9eb5b07ae8b0d (patch) | |
tree | 7582b73e234bfdba020c834c1b19dd5e30ad0c69 /llvm/lib/IR/DIBuilder.cpp | |
parent | 1706f34d604ec304af58a7b95dbc127bd77e17fa (diff) | |
download | llvm-8d3843badb8a32a56531e383a2a9eb5b07ae8b0d.zip llvm-8d3843badb8a32a56531e383a2a9eb5b07ae8b0d.tar.gz llvm-8d3843badb8a32a56531e383a2a9eb5b07ae8b0d.tar.bz2 |
[clang][DebugInfo] Simplify logic to determine DW_AT_default_value for template parameters
DWARFv5 added support for labelling template parameters with
DW_AT_default_value to indicate whether the particular instantiation
defaulted parameter. The current implementation only supports a limited
set of possible cases. Namely for non-value-dependent integral template
parameters and simple type template parameters.
Useful cases that don't work are:
1. Type template parameters with defaults that are
themselves templates. E.g.,
```
template<typename T1, typename T2 = Foo<T1>> class C1;
template<typename T = Foo<int>> class C2;
etc.
```
2. Template template parameters
`clang::isSubstitutedDefaultArgument` already implement the required logic
to determine whether a template argument is defaulted. This patch re-uses
this logic for DWARF CodeGen.
Differential Revision: https://reviews.llvm.org/D139988
Diffstat (limited to 'llvm/lib/IR/DIBuilder.cpp')
0 files changed, 0 insertions, 0 deletions