mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
For DW_TAG_template_type_parameter the actual passed in type could
be void and therefore not have a type entry. Only add the type if it is non-void and provide a testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187966 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1123,7 +1123,9 @@ CompileUnit::getOrCreateTemplateTypeParameterDIE(DITemplateTypeParameter TP) {
|
||||
return ParamDIE;
|
||||
|
||||
ParamDIE = new DIE(dwarf::DW_TAG_template_type_parameter);
|
||||
addType(ParamDIE, TP.getType());
|
||||
// Add the type if it exists, it could be void and therefore no type.
|
||||
if (TP.getType())
|
||||
addType(ParamDIE, TP.getType());
|
||||
if (!TP.getName().empty())
|
||||
addString(ParamDIE, dwarf::DW_AT_name, TP.getName());
|
||||
return ParamDIE;
|
||||
|
Reference in New Issue
Block a user