summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/MC/MCSection.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/MC/MCSection.h')
-rw-r--r--llvm/include/llvm/MC/MCSection.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/include/llvm/MC/MCSection.h b/llvm/include/llvm/MC/MCSection.h
index 32238586fd6..06d7e6af1e0 100644
--- a/llvm/include/llvm/MC/MCSection.h
+++ b/llvm/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
OpenPOWER on IntegriCloud