[llvm-commits] CVS: llvm/include/llvm/CodeGen/ELFWriter.h

Chris Lattner lattner at cs.uiuc.edu
Sun Jul 10 22:15:43 PDT 2005



Changes in directory llvm/include/llvm/CodeGen:

ELFWriter.h updated: 1.3 -> 1.4
---
Log message:

expose a new code emitter object


---
Diffs of the changes:  (+14 -1)

 ELFWriter.h |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/ELFWriter.h
diff -u llvm/include/llvm/CodeGen/ELFWriter.h:1.3 llvm/include/llvm/CodeGen/ELFWriter.h:1.4
--- llvm/include/llvm/CodeGen/ELFWriter.h:1.3	Sun Jul 10 22:11:10 2005
+++ llvm/include/llvm/CodeGen/ELFWriter.h	Mon Jul 11 00:15:32 2005
@@ -19,12 +19,22 @@
 namespace llvm {
   class GlobalVariable;
   class Mangler;
+  class MachineCodeEmitter;
+  class ELFCodeEmitter;
 
   /// ELFWriter - This class implements the common target-independent code for
   /// writing ELF files.  Targets should derive a class from this to
   /// parameterize the output format.
   ///
   class ELFWriter : public MachineFunctionPass {
+    friend class ELFCodeEmitter;
+  public:
+    MachineCodeEmitter &getMachineCodeEmitter() const {
+      return *(MachineCodeEmitter*)MCE;
+    }
+
+    ~ELFWriter();
+
   protected:
     ELFWriter(std::ostream &O, TargetMachine &TM);
 
@@ -40,6 +50,10 @@
     ///
     Mangler *Mang;
 
+    /// MCE - The MachineCodeEmitter object that we are exposing to emit machine
+    /// code for functions to the .o file.
+    ELFCodeEmitter *MCE;
+
     //===------------------------------------------------------------------===//
     // Properties to be set by the derived class ctor, used to configure the
     // ELFWriter.
@@ -143,7 +157,6 @@
     /// the local symbols first in the list).
     std::vector<ELFSym> SymbolTable;
 
-
     // As we accumulate the ELF file into OutputBuffer, we occasionally need to
     // keep track of locations to update later (e.g. the location of the section
     // table in the ELF header.  These members keep track of the offset in






More information about the llvm-commits mailing list