diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-08-02 20:42:45 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-08-02 20:42:45 +0000 |
commit | 1ad5ebc3edd613ca77951e8e8a76c4612836c46c (patch) | |
tree | 8f0e6fc3ac564b73a5b92f08ab2d88b9c72628fb /llvm/lib/CodeGen/AsmPrinter | |
parent | afdafb126ab64da3c3cd5cb9cc0f56dc2e089158 (diff) | |
download | bcm5719-llvm-1ad5ebc3edd613ca77951e8e8a76c4612836c46c.tar.gz bcm5719-llvm-1ad5ebc3edd613ca77951e8e8a76c4612836c46c.zip |
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
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DIE.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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); } |