diff options
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/CodeGen/DwarfWriter.cpp | 35 |
2 files changed, 20 insertions, 18 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp index e6d56244c9c..5af89c79c80 100644 --- a/llvm/lib/CodeGen/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter.cpp @@ -27,7 +27,8 @@ #include <cerrno> using namespace llvm; -AsmPrinter::AsmPrinter(std::ostream &o, TargetMachine &tm, TargetAsmInfo *T) +AsmPrinter::AsmPrinter(std::ostream &o, TargetMachine &tm, + const TargetAsmInfo *T) : FunctionNumber(0), O(o), TM(tm), TAI(T) {} diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp index 9c4726ebc78..22d67449e17 100644 --- a/llvm/lib/CodeGen/DwarfWriter.cpp +++ b/llvm/lib/CodeGen/DwarfWriter.cpp @@ -574,24 +574,24 @@ void DIEAbbrev::Emit(const DwarfWriter &DW) const { } #ifndef NDEBUG - void DIEAbbrev::print(std::ostream &O) { - O << "Abbreviation @" - << std::hex << (intptr_t)this << std::dec +void DIEAbbrev::print(std::ostream &O) { + O << "Abbreviation @" + << std::hex << (intptr_t)this << std::dec + << " " + << TagString(Tag) + << " " + << ChildrenString(ChildrenFlag) + << "\n"; + + for (unsigned i = 0, N = Data.size(); i < N; ++i) { + O << " " + << AttributeString(Data[i].getAttribute()) << " " - << TagString(Tag) - << " " - << ChildrenString(ChildrenFlag) + << FormEncodingString(Data[i].getForm()) << "\n"; - - for (unsigned i = 0, N = Data.size(); i < N; ++i) { - O << " " - << AttributeString(Data[i].getAttribute()) - << " " - << FormEncodingString(Data[i].getForm()) - << "\n"; - } } - void DIEAbbrev::dump() { print(std::cerr); } +} +void DIEAbbrev::dump() { print(std::cerr); } #endif //===----------------------------------------------------------------------===// @@ -1160,7 +1160,7 @@ void DwarfWriter::EmitReference(const std::string &Name) const { /// is an option (needsSet) to use an intermediary 'set' expression. void DwarfWriter::EmitDifference(const char *TagHi, unsigned NumberHi, const char *TagLo, unsigned NumberLo) const { - if (TAI->getNeedsSet()) { + if (TAI->needsSet()) { static unsigned SetCounter = 0; O << "\t.set\t"; @@ -2467,7 +2467,8 @@ void DwarfWriter::ConstructSubprogramDIEs() { // Main entry points. // -DwarfWriter::DwarfWriter(std::ostream &OS, AsmPrinter *A, TargetAsmInfo *T) +DwarfWriter::DwarfWriter(std::ostream &OS, AsmPrinter *A, + const TargetAsmInfo *T) : O(OS) , Asm(A) , TAI(T) |