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 | 2798119ab4d7e0b42812b3acdf37821f40dee627 (patch) | |
tree | 4af4b7559431bde228d22486e236837d325905eb /include/llvm/MC/SectionKind.h | |
parent | 83d77faf6e8fc2c1c2377d037283dc162d8667a1 (diff) | |
download | llvm-2798119ab4d7e0b42812b3acdf37821f40dee627.tar.gz llvm-2798119ab4d7e0b42812b3acdf37821f40dee627.tar.bz2 llvm-2798119ab4d7e0b42812b3acdf37821f40dee627.tar.xz |
(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 |