[llvm] r243855 - AsmPrinter: Take DIEValueList in some DwarfUnit API, NFC
Duncan P. N. Exon Smith
dexonsmith at apple.com
Sun Aug 2 13:44:46 PDT 2015
Author: dexonsmith
Date: Sun Aug 2 15:44:46 2015
New Revision: 243855
URL: http://llvm.org/viewvc/llvm-project?rev=243855&view=rev
Log:
AsmPrinter: Take DIEValueList in some DwarfUnit API, NFC
Take `DIEValueList` instead of `DIE` so that `DIEBlock` and `DIELoc` can
stop inheriting from `DIE` in a future commit.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=243855&r1=243854&r2=243855&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Sun Aug 2 15:44:46 2015
@@ -192,18 +192,19 @@ void DwarfUnit::addFlag(DIE &Die, dwarf:
DIEInteger(1));
}
-void DwarfUnit::addUInt(DIE &Die, dwarf::Attribute Attribute,
+void DwarfUnit::addUInt(DIEValueList &Die, dwarf::Attribute Attribute,
Optional<dwarf::Form> Form, uint64_t Integer) {
if (!Form)
Form = DIEInteger::BestForm(false, Integer);
Die.addValue(DIEValueAllocator, Attribute, *Form, DIEInteger(Integer));
}
-void DwarfUnit::addUInt(DIE &Block, dwarf::Form Form, uint64_t Integer) {
+void DwarfUnit::addUInt(DIEValueList &Block, dwarf::Form Form,
+ uint64_t Integer) {
addUInt(Block, (dwarf::Attribute)0, Form, Integer);
}
-void DwarfUnit::addSInt(DIE &Die, dwarf::Attribute Attribute,
+void DwarfUnit::addSInt(DIEValueList &Die, dwarf::Attribute Attribute,
Optional<dwarf::Form> Form, int64_t Integer) {
if (!Form)
Form = DIEInteger::BestForm(true, Integer);
@@ -222,9 +223,10 @@ void DwarfUnit::addString(DIE &Die, dwar
DIEString(DU->getStringPool().getEntry(*Asm, String)));
}
-DIE::value_iterator DwarfUnit::addLabel(DIE &Die, dwarf::Attribute Attribute,
- dwarf::Form Form,
- const MCSymbol *Label) {
+DIEValueList::value_iterator DwarfUnit::addLabel(DIEValueList &Die,
+ dwarf::Attribute Attribute,
+ dwarf::Form Form,
+ const MCSymbol *Label) {
return Die.addValue(DIEValueAllocator, Attribute, Form, DIELabel(Label));
}
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h?rev=243855&r1=243854&r2=243855&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h Sun Aug 2 15:44:46 2015
@@ -186,14 +186,14 @@ public:
void addFlag(DIE &Die, dwarf::Attribute Attribute);
/// Add an unsigned integer attribute data and value.
- void addUInt(DIE &Die, dwarf::Attribute Attribute, Optional<dwarf::Form> Form,
- uint64_t Integer);
+ void addUInt(DIEValueList &Die, dwarf::Attribute Attribute,
+ Optional<dwarf::Form> Form, uint64_t Integer);
- void addUInt(DIE &Block, dwarf::Form Form, uint64_t Integer);
+ void addUInt(DIEValueList &Block, dwarf::Form Form, uint64_t Integer);
/// Add an signed integer attribute data and value.
- void addSInt(DIE &Die, dwarf::Attribute Attribute, Optional<dwarf::Form> Form,
- int64_t Integer);
+ void addSInt(DIEValueList &Die, dwarf::Attribute Attribute,
+ Optional<dwarf::Form> Form, int64_t Integer);
void addSInt(DIELoc &Die, Optional<dwarf::Form> Form, int64_t Integer);
@@ -206,8 +206,10 @@ public:
void addString(DIE &Die, dwarf::Attribute Attribute, StringRef Str);
/// Add a Dwarf label attribute data and value.
- DIE::value_iterator addLabel(DIE &Die, dwarf::Attribute Attribute,
- dwarf::Form Form, const MCSymbol *Label);
+ DIEValueList::value_iterator addLabel(DIEValueList &Die,
+ dwarf::Attribute Attribute,
+ dwarf::Form Form,
+ const MCSymbol *Label);
void addLabel(DIELoc &Die, dwarf::Form Form, const MCSymbol *Label);
More information about the llvm-commits
mailing list