[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp DwarfWriter.cpp

Jim Laskey jlaskey at apple.com
Thu Sep 7 15:07:08 PDT 2006



Changes in directory llvm/lib/CodeGen:

AsmPrinter.cpp updated: 1.92 -> 1.93
DwarfWriter.cpp updated: 1.74 -> 1.75
---
Log message:

Make target asm info a property of the target machine.


---
Diffs of the changes:  (+20 -18)

 AsmPrinter.cpp  |    3 ++-
 DwarfWriter.cpp |   35 ++++++++++++++++++-----------------
 2 files changed, 20 insertions(+), 18 deletions(-)


Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.92 llvm/lib/CodeGen/AsmPrinter.cpp:1.93
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.92	Thu Sep  7 13:50:20 2006
+++ llvm/lib/CodeGen/AsmPrinter.cpp	Thu Sep  7 17:06:40 2006
@@ -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)
 {}
 


Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.74 llvm/lib/CodeGen/DwarfWriter.cpp:1.75
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.74	Wed Sep  6 13:34:40 2006
+++ llvm/lib/CodeGen/DwarfWriter.cpp	Thu Sep  7 17:06:40 2006
@@ -574,24 +574,24 @@
 }
 
 #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 @@
 /// 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 @@
 // 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)






More information about the llvm-commits mailing list