diff options
author | Eric Christopher <echristo@gmail.com> | 2013-10-21 17:48:51 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-10-21 17:48:51 +0000 |
commit | 691281be2f65398f7242ac74cca0f3dcb2ff2239 (patch) | |
tree | 92aafd2eb609c3b4345b2e36f434678fdb7cb497 /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | |
parent | 4fba04942da8f687867af270b49dbb53881f2dd6 (diff) | |
download | bcm5719-llvm-691281be2f65398f7242ac74cca0f3dcb2ff2239.tar.gz bcm5719-llvm-691281be2f65398f7242ac74cca0f3dcb2ff2239.zip |
Fix up some old review feedback.
llvm-svn: 193095
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 57eb1d24109..290d80ceffd 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -1300,7 +1300,7 @@ 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()) + if (VP.getTag() == dwarf::DW_TAG_template_value_parameter) addType(ParamDIE, resolve(VP.getType())); if (!VP.getName().empty()) addString(ParamDIE, dwarf::DW_AT_name, VP.getName()); @@ -1411,12 +1411,13 @@ DIE *CompileUnit::getOrCreateSubprogramDIE(DISubprogram SP) { Language == dwarf::DW_LANG_ObjC)) addFlag(SPDie, dwarf::DW_AT_prototyped); - // Add Return Type. A void return type will not have a type. DICompositeType SPTy = SP.getType(); assert(SPTy.getTag() == dwarf::DW_TAG_subroutine_type && "the type of a subprogram should be a subroutine"); DIArray Args = SPTy.getTypeArray(); + // Add a return type. If this is a type like a C/C++ void type we don't add a + // return type. if (Args.getElement(0)) addType(SPDie, DIType(Args.getElement(0))); |