Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang][DebugInfo] Simplify logic to determine DW_AT_default_value fo…
…r 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
- Loading branch information
1 parent
1706f34
commit 8d3843b
Showing
2 changed files
with
18 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters