diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-31 18:48:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-31 18:48:30 +0000 |
commit | a87dea4f8c546ca748f1777a8d1cabcc06515d91 (patch) | |
tree | 96993fb5aee8978a97581a0f79f86c61b2e1005f /include/llvm/MC/MCSection.h | |
parent | 5e5337a833c36b069723ff864c873a1ba4883b99 (diff) | |
download | external_llvm-a87dea4f8c546ca748f1777a8d1cabcc06515d91.zip external_llvm-a87dea4f8c546ca748f1777a8d1cabcc06515d91.tar.gz external_llvm-a87dea4f8c546ca748f1777a8d1cabcc06515d91.tar.bz2 |
switch off of 'Section' onto MCSection. We're not properly using
MCSection subclasses yet, but this is a step in the right direction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77708 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCSection.h')
-rw-r--r-- | include/llvm/MC/MCSection.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/llvm/MC/MCSection.h b/include/llvm/MC/MCSection.h index 3223858..06d7e6a 100644 --- a/include/llvm/MC/MCSection.h +++ b/include/llvm/MC/MCSection.h @@ -32,30 +32,35 @@ namespace llvm { void operator=(const MCSection&); // DO NOT IMPLEMENT protected: MCSection(const StringRef &Name, MCContext &Ctx); + // FIXME: HACK. + SectionKind Kind; public: virtual ~MCSection(); static MCSection *Create(const StringRef &Name, MCContext &Ctx); const std::string &getName() const { return Name; } + SectionKind getKind() const { return Kind; } }; /// MCSectionWithKind - This is used by targets that use the SectionKind enum /// to classify their sections. class MCSectionWithKind : public MCSection { - SectionKind Kind; MCSectionWithKind(const StringRef &Name, SectionKind K, MCContext &Ctx) - : MCSection(Name, Ctx), Kind(K) {} + : MCSection(Name, Ctx) { + Kind = K; + } public: static MCSectionWithKind *Create(const StringRef &Name, SectionKind K, MCContext &Ctx); - SectionKind getKind() const { return Kind; } }; + typedef MCSectionWithKind MCSectionELF; + } // end namespace llvm #endif |