aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-07-16 17:40:34 +0000
committerChris Lattner <sabre@nondot.org>2005-07-16 17:40:34 +0000
commit56c3261e3415154969f8a2881e4097c40d92c60c (patch)
tree04a18b9d8f493927edb3c9fa594e27250ad3b873 /include/llvm/CodeGen
parent000339532046486632f50bb66ae75b3bbd38d387 (diff)
Add two helper methods, adjust a prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22456 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/ELFWriter.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/ELFWriter.h b/include/llvm/CodeGen/ELFWriter.h
index 3d3d448aa1..080e430195 100644
--- a/include/llvm/CodeGen/ELFWriter.h
+++ b/include/llvm/CodeGen/ELFWriter.h
@@ -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 @@ namespace llvm {
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 @@ namespace llvm {
}
private:
- void EmitGlobal(GlobalVariable *GV, ELFSection &DataSection,
- ELFSection &BSSSection);
+ void EmitGlobal(GlobalVariable *GV);
void EmitSymbolTable();