From 1ad5ebc3edd613ca77951e8e8a76c4612836c46c Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Sun, 2 Aug 2015 20:42:45 +0000 Subject: AsmPrinter: Change DIEValueList to a subclass of DIE, NFC Rewrite `DIEValueList` as a subclass of `DIE`, renaming its API to match `DIE`'s. This is preparation for changing `DIEBlock` and `DIELoc` to stop inheriting from `DIE` and inherit directly from `DIEValueList`. I thought about leaving this as a has-a relationship (and changing `DIELoc` and `DIEBlock` to also have-a `DIEValueList`), but that seemed to require a fair bit more boilerplate and I think it needed more changes to the `DwarfUnit` API than this will. No functionality change intended here. llvm-svn: 243854 --- llvm/lib/CodeGen/AsmPrinter/DIE.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter') diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp index e867ddcf340..bd68a87a6e9 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp @@ -109,7 +109,7 @@ void DIEAbbrev::dump() { print(dbgs()); } DIEAbbrev DIE::generateAbbrev() const { DIEAbbrev Abbrev(Tag, hasChildren()); - for (const DIEValue &V : Values) + for (const DIEValue &V : values()) Abbrev.AddAttribute(V.getAttribute(), V.getForm()); return Abbrev; } @@ -166,7 +166,7 @@ void DIE::print(raw_ostream &O, unsigned IndentCount) const { IndentCount += 2; unsigned I = 0; - for (const auto &V : Values) { + for (const auto &V : values()) { O << Indent; if (!isBlock) @@ -507,7 +507,7 @@ void DIETypeSignature::print(raw_ostream &O) const { /// unsigned DIELoc::ComputeSize(const AsmPrinter *AP) const { if (!Size) { - for (const auto &V : Values) + for (const auto &V : values()) Size += V.SizeOf(AP); } @@ -527,7 +527,7 @@ void DIELoc::EmitValue(const AsmPrinter *Asm, dwarf::Form Form) const { Asm->EmitULEB128(Size); break; } - for (const auto &V : Values) + for (const auto &V : values()) V.EmitValue(Asm); } @@ -560,7 +560,7 @@ void DIELoc::print(raw_ostream &O) const { /// unsigned DIEBlock::ComputeSize(const AsmPrinter *AP) const { if (!Size) { - for (const auto &V : Values) + for (const auto &V : values()) Size += V.SizeOf(AP); } @@ -578,7 +578,7 @@ void DIEBlock::EmitValue(const AsmPrinter *Asm, dwarf::Form Form) const { case dwarf::DW_FORM_block: Asm->EmitULEB128(Size); break; } - for (const auto &V : Values) + for (const auto &V : values()) V.EmitValue(Asm); } -- cgit v1.2.3