diff options
| author | Vassil Vassilev <v.g.vassilev@gmail.com> | 2016-10-26 10:13:47 +0000 |
|---|---|---|
| committer | Vassil Vassilev <v.g.vassilev@gmail.com> | 2016-10-26 10:13:47 +0000 |
| commit | df5042ab613a71d0fee0e1ac8a36a22b1f8bc241 (patch) | |
| tree | 9de937190ffb16c69018f4ca46058872171fd74f /llvm/lib/CodeGen/AsmPrinter | |
| parent | 4d5b99a79c6f60800d8e8f4379b9c1319facd5fe (diff) | |
| download | bcm5719-llvm-df5042ab613a71d0fee0e1ac8a36a22b1f8bc241.tar.gz bcm5719-llvm-df5042ab613a71d0fee0e1ac8a36a22b1f8bc241.zip | |
Revert r285181 "DebugInfo: support for DWARFv5 DW_AT_alignment attribute".
The commit broke the builds.
llvm-svn: 285183
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 12 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 13 |
2 files changed, 1 insertions, 24 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index bb3d02cce8b..025e69354d1 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -118,10 +118,6 @@ DIE *DwarfCompileUnit::getOrCreateGlobalVariableDIE( else addGlobalName(GV->getName(), *VariableDIE, DeclContext); - if (DIAlignment AlignInBytes = GV->getAlignInBytes()) - addUInt(*VariableDIE, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata, - AlignInBytes); - // Add location. bool addToAccelTable = false; @@ -775,13 +771,7 @@ void DwarfCompileUnit::applyVariableAttributes(const DbgVariable &Var, StringRef Name = Var.getName(); if (!Name.empty()) addString(VariableDie, dwarf::DW_AT_name, Name); - const auto *DIVar = Var.getVariable(); - if (DIVar) - if (DIAlignment AlignInBytes = DIVar->getAlignInBytes()) - addUInt(VariableDie, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata, - AlignInBytes); - - addSourceLine(VariableDie, DIVar); + addSourceLine(VariableDie, Var.getVariable()); addType(VariableDie, Var.getType()); if (Var.isArtificial()) addFlag(VariableDie, dwarf::DW_AT_artificial); diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index d3b84de9eb5..bec554dcdf0 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -1007,11 +1007,6 @@ void DwarfUnit::constructTypeDIE(DIE &Buffer, const DICompositeType *CTy) { if (RLang) addUInt(Buffer, dwarf::DW_AT_APPLE_runtime_class, dwarf::DW_FORM_data1, RLang); - - // Add align info if available. - if (uint64_t AlignInBytes = CTy->getAlignInBytes()) - addUInt(Buffer, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata, - AlignInBytes); } } @@ -1399,7 +1394,6 @@ void DwarfUnit::constructMemberDIE(DIE &Buffer, const DIDerivedType *DT) { } else { uint64_t Size = DT->getSizeInBits(); uint64_t FieldSize = DD->getBaseTypeSize(DT); - uint64_t AlignInBytes = DT->getAlignInBytes(); uint64_t OffsetInBytes; bool IsBitfield = FieldSize && Size != FieldSize; @@ -1437,9 +1431,6 @@ void DwarfUnit::constructMemberDIE(DIE &Buffer, const DIDerivedType *DT) { } else { // This is not a bitfield. OffsetInBytes = DT->getOffsetInBits() / 8; - if (AlignInBytes) - addUInt(MemberDie, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata, - AlignInBytes); } if (DD->getDwarfVersion() <= 2) { @@ -1516,10 +1507,6 @@ DIE *DwarfUnit::getOrCreateStaticMemberDIE(const DIDerivedType *DT) { if (const ConstantFP *CFP = dyn_cast_or_null<ConstantFP>(DT->getConstant())) addConstantFPValue(StaticMemberDIE, CFP); - if (uint64_t AlignInBytes = DT->getAlignInBytes()) - addUInt(StaticMemberDIE, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata, - AlignInBytes); - return &StaticMemberDIE; } |

