diff options
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 |