diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-12-02 18:44:29 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-12-02 18:44:29 +0000 |
commit | fab3e599b0a6a22b3f9efee3aa5121f17239f8b6 (patch) | |
tree | bf742bbac7b34fb58799da97713b47123b166446 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 4e5f6e64f171b144660f6198a93dc2ff9cfb3dd7 (diff) | |
download | llvm-fab3e599b0a6a22b3f9efee3aa5121f17239f8b6.tar.gz llvm-fab3e599b0a6a22b3f9efee3aa5121f17239f8b6.tar.bz2 llvm-fab3e599b0a6a22b3f9efee3aa5121f17239f8b6.tar.xz |
DebugInfo: Type Units: Propagate the correct DW_AT_language into type units.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196130 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 33bd6f27ba..9eab090e47 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/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. |