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:
- 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.
- 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.