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

Chris Lattner lattner at cs.uiuc.edu
Sat Jul 16 10:35:37 PDT 2005



Changes in directory llvm/include/llvm/CodeGen:

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

Add ability to set TYPE and FLAGS field for section trivially


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

 ELFWriter.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/ELFWriter.h
diff -u llvm/include/llvm/CodeGen/ELFWriter.h:1.8 llvm/include/llvm/CodeGen/ELFWriter.h:1.9
--- llvm/include/llvm/CodeGen/ELFWriter.h:1.8	Sat Jul 16 03:00:57 2005
+++ llvm/include/llvm/CodeGen/ELFWriter.h	Sat Jul 16 12:35:26 2005
@@ -152,13 +152,16 @@
 
     /// getSection - Return the section with the specified name, creating a new
     /// section if one does not already exist.
-    ELFSection &getSection(const std::string &Name) {
+    ELFSection &getSection(const std::string &Name,
+                           unsigned Type, unsigned Flags = 0) {
       ELFSection *&SN = SectionLookup[Name];
       if (SN) return *SN;
 
       SectionList.push_back(Name);
       SN = &SectionList.back();
       SN->SectionIdx = NumSections++;
+      SN->Type = Type;
+      SN->Flags = Flags;
       return *SN;
     }
 






More information about the llvm-commits mailing list