Support Constant Pool Sections
[oota-llvm.git] / lib / CodeGen / ELFWriter.h
index 39577d9a97dd12a892a947aaa7eee603f2fc5376..e0e71d01fa5aa960a2ae319e477113f85ebbd022 100644 (file)
@@ -147,6 +147,12 @@ namespace llvm {
                         ELFSection::SHF_EXECINSTR | ELFSection::SHF_ALLOC);
     }
 
+    /// Get a constant pool section based on the section name returned by TAI
+    ELFSection &getConstantPoolSection(std::string SName, unsigned Align) {
+      return getSection(SName, ELFSection::SHT_PROGBITS,
+                        ELFSection::SHF_MERGE | ELFSection::SHF_ALLOC, Align);
+    }
+
     /// Return the relocation section of section 'S'. 'RelA' is true
     /// if the relocation section contains entries with addends.
     ELFSection &getRelocSection(std::string SName, bool RelA) {