diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-01 23:57:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-01 23:57:16 +0000 |
commit | a945341d921f780e95b14475069c3a9c0d1c6575 (patch) | |
tree | 4af4b7559431bde228d22486e236837d325905eb /include/llvm/MC/SectionKind.h | |
parent | d7f8c0a3b0375ca1550977e6281cb191712159b8 (diff) | |
download | external_llvm-a945341d921f780e95b14475069c3a9c0d1c6575.tar.gz external_llvm-a945341d921f780e95b14475069c3a9c0d1c6575.tar.bz2 external_llvm-a945341d921f780e95b14475069c3a9c0d1c6575.zip |
(re)introduce new simpler apis for creation sectionkinds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/SectionKind.h')
-rw-r--r-- | include/llvm/MC/SectionKind.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/llvm/MC/SectionKind.h b/include/llvm/MC/SectionKind.h index 35a0d190f2..8cb9b325c7 100644 --- a/include/llvm/MC/SectionKind.h +++ b/include/llvm/MC/SectionKind.h @@ -117,7 +117,6 @@ public: protected: Kind K : 8; - public: bool isMetadata() const { return K == Metadata; } @@ -177,6 +176,25 @@ public: Res.K = K; return Res; } + + static SectionKind getMetadata() { return get(Metadata); } + static SectionKind getText() { return get(Text); } + static SectionKind getReadOnly() { return get(ReadOnly); } + static SectionKind getMergeableCString() { return get(MergeableCString); } + static SectionKind getMergeableConst() { return get(MergeableConst); } + static SectionKind getMergeableConst4() { return get(MergeableConst4); } + static SectionKind getMergeableConst8() { return get(MergeableConst8); } + static SectionKind getMergeableConst16() { return get(MergeableConst16); } + static SectionKind getThreadBSS() { return get(ThreadBSS); } + static SectionKind getThreadData() { return get(ThreadData); } + static SectionKind getBSS() { return get(BSS); } + static SectionKind getDataRel() { return get(DataRel); } + static SectionKind getDataRelLocal() { return get(DataRelLocal); } + static SectionKind getDataNoRel() { return get(DataNoRel); } + static SectionKind getReadOnlyWithRel() { return get(ReadOnlyWithRel); } + static SectionKind getReadOnlyWithRelLocal(){ + return get(ReadOnlyWithRelLocal); + } }; } // end namespace llvm |