aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/ELFWriter.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-07-16 17:35:26 +0000
committerChris Lattner <sabre@nondot.org>2005-07-16 17:35:26 +0000
commit5f9cb59f057df378e0ce3f93adbdfef1d2324a43 (patch)
tree0e879ca54995d2c486066a5bb93290c7ce09c800 /include/llvm/CodeGen/ELFWriter.h
parent5f48ff7d1f27891f129ff09f1bbd0fced8c41f5a (diff)
Add ability to set TYPE and FLAGS field for section trivially
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/ELFWriter.h')
-rw-r--r--include/llvm/CodeGen/ELFWriter.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/ELFWriter.h b/include/llvm/CodeGen/ELFWriter.h
index 9211047f4a..3d3d448aa1 100644
--- a/include/llvm/CodeGen/ELFWriter.h
+++ b/include/llvm/CodeGen/ELFWriter.h
@@ -152,13 +152,16 @@ namespace llvm {
/// 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;
}