diff options
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 10 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index e6b3331cf62..48003c06ebe 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -989,7 +989,7 @@ DIE *CompileUnit::getOrCreateTypeDIE(const MDNode *TyNode) { else if (Ty.isCompositeType()) { DICompositeType CTy(Ty); if (shouldCreateTypeUnit(CTy, DD)) { - DD->addTypeUnitType(TyDIE, CTy); + DD->addTypeUnitType(getLanguage(), TyDIE, CTy); // Skip updating the accellerator tables since this is not the full type return TyDIE; } diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 33bd6f27ba3..9eab090e47d 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -3055,7 +3055,8 @@ void DwarfDebug::emitDebugStrDWO() { OffSec, StrSym); } -void DwarfDebug::addTypeUnitType(DIE *RefDie, DICompositeType CTy) { +void DwarfDebug::addTypeUnitType(uint16_t Language, DIE *RefDie, + DICompositeType CTy) { DenseMap<const MDNode *, std::pair<uint64_t, SmallVectorImpl<DIE *> *> >::iterator I = TypeUnits.find(CTy); @@ -3068,12 +3069,11 @@ void DwarfDebug::addTypeUnitType(DIE *RefDie, DICompositeType CTy) { } } else { DIE *UnitDie = new DIE(dwarf::DW_TAG_type_unit); - CompileUnit *NewCU = - new CompileUnit(GlobalCUIndexCount++, UnitDie, - dwarf::DW_LANG_C_plus_plus, Asm, this, &InfoHolder); + CompileUnit *NewCU = new CompileUnit(GlobalCUIndexCount++, UnitDie, + Language, Asm, this, &InfoHolder); CUDieMap.insert(std::make_pair(UnitDie, NewCU)); NewCU->addUInt(UnitDie, dwarf::DW_AT_language, dwarf::DW_FORM_data2, - dwarf::DW_LANG_C_plus_plus); + Language); // Register the type in the TypeUnits map with a vector of references to be // populated whenever a reference is required. diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h index c42a3f1a742..c334770fafa 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -704,7 +704,7 @@ public: /// \brief Add a DIE to the set of types that we're going to pull into /// type units. - void addTypeUnitType(DIE *Die, DICompositeType CTy); + void addTypeUnitType(uint16_t Language, DIE *Die, DICompositeType CTy); /// \brief Add a label so that arange data can be generated for it. void addArangeLabel(SymbolCU SCU) { ArangeLabels.push_back(SCU); } |

