From 88b0f948f50d6c6a7891c7dae1cbd8c457f8c056 Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Wed, 9 Oct 2013 19:46:28 +0000 Subject: Debug Info: In DIBuilder, the context and type fields of template_type and template_value are updated to use DIRef. A paired commit at clang is required due to changes to DIBuilder. llvm-svn: 192320 --- llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index d8547629457..b8bc0a90c31 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -1228,7 +1228,7 @@ CompileUnit::getOrCreateTemplateTypeParameterDIE(DITemplateTypeParameter TP) { ParamDIE = new DIE(dwarf::DW_TAG_template_type_parameter); // Add the type if it exists, it could be void and therefore no type. if (TP.getType()) - addType(ParamDIE, TP.getType()); + addType(ParamDIE, resolve(TP.getType())); if (!TP.getName().empty()) addString(ParamDIE, dwarf::DW_AT_name, TP.getName()); return ParamDIE; @@ -1247,12 +1247,13 @@ CompileUnit::getOrCreateTemplateValueParameterDIE(DITemplateValueParameter VP) { // Add the type if there is one, template template and template parameter // packs will not have a type. if (VP.getType()) - addType(ParamDIE, VP.getType()); + addType(ParamDIE, resolve(VP.getType())); if (!VP.getName().empty()) addString(ParamDIE, dwarf::DW_AT_name, VP.getName()); if (Value *Val = VP.getValue()) { if (ConstantInt *CI = dyn_cast(Val)) - addConstantValue(ParamDIE, CI, isUnsignedDIType(DD, VP.getType())); + addConstantValue(ParamDIE, CI, + isUnsignedDIType(DD, resolve(VP.getType()))); else if (GlobalValue *GV = dyn_cast(Val)) { // For declaration non-type template parameters (such as global values and // functions) -- cgit v1.2.3