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

Chris Lattner lattner at cs.uiuc.edu
Sat Jul 16 10:40:45 PDT 2005



Changes in directory llvm/include/llvm/CodeGen:

ELFWriter.h updated: 1.9 -> 1.10
---
Log message:

Add two helper methods, adjust a prototype


---
Diffs of the changes:  (+12 -4)

 ELFWriter.h |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)


Index: llvm/include/llvm/CodeGen/ELFWriter.h
diff -u llvm/include/llvm/CodeGen/ELFWriter.h:1.9 llvm/include/llvm/CodeGen/ELFWriter.h:1.10
--- llvm/include/llvm/CodeGen/ELFWriter.h:1.9	Sat Jul 16 12:35:26 2005
+++ llvm/include/llvm/CodeGen/ELFWriter.h	Sat Jul 16 12:40:34 2005
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file was developed by Chris Lattner and is distributed under the
+// University of Illinois Open Source License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -165,6 +165,15 @@
       return *SN;
     }
 
+    ELFSection &getDataSection() {
+      return getSection(".data", ELFSection::SHT_PROGBITS,
+                        ELFSection::SHF_WRITE | ELFSection::SHF_ALLOC);
+    }
+    ELFSection &getBSSSection() {
+      return getSection(".bss", ELFSection::SHT_NOBITS,
+                        ELFSection::SHF_WRITE | ELFSection::SHF_ALLOC);
+    }
+
     /// ELFSym - This struct contains information about each symbol that is
     /// added to logical symbol table for the module.  This is eventually
     /// turned into a real symbol table in the file.
@@ -302,8 +311,7 @@
     }
 
   private:
-    void EmitGlobal(GlobalVariable *GV, ELFSection &DataSection,
-                    ELFSection &BSSSection);
+    void EmitGlobal(GlobalVariable *GV);
 
     void EmitSymbolTable();
 






More information about the llvm-commits mailing list