summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-10-09 19:46:28 +0000
committerManman Ren <manman.ren@gmail.com>2013-10-09 19:46:28 +0000
commitb4d9c11f6c7e0a38e750f946d5cea3ffa5ae8f61 (patch)
tree1c8e3279acc05997c5cd0ad7e17a94a73a4324eb /lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
parent9360e64e60f600bff98dbff96fabaab536947f86 (diff)
downloadllvm-b4d9c11f6c7e0a38e750f946d5cea3ffa5ae8f61.tar.gz
llvm-b4d9c11f6c7e0a38e750f946d5cea3ffa5ae8f61.tar.bz2
llvm-b4d9c11f6c7e0a38e750f946d5cea3ffa5ae8f61.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192320 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index d854762945..b8bc0a90c3 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/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<ConstantInt>(Val))
- addConstantValue(ParamDIE, CI, isUnsignedDIType(DD, VP.getType()));
+ addConstantValue(ParamDIE, CI,
+ isUnsignedDIType(DD, resolve(VP.getType())));
else if (GlobalValue *GV = dyn_cast<GlobalValue>(Val)) {
// For declaration non-type template parameters (such as global values and
// functions)