summaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCSection.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-01 18:25:49 +0000
committerChris Lattner <sabre@nondot.org>2009-08-01 18:25:49 +0000
commit4a7bc1e5aafbb543a9a535bce54fc62d18723b35 (patch)
tree950136749ff57f13b332aabbba572695d4dcc8e7 /include/llvm/MC/MCSection.h
parentf67e84edefe240bb1d30cfb63cf46f2d5631a072 (diff)
downloadllvm-4a7bc1e5aafbb543a9a535bce54fc62d18723b35.tar.gz
llvm-4a7bc1e5aafbb543a9a535bce54fc62d18723b35.tar.bz2
llvm-4a7bc1e5aafbb543a9a535bce54fc62d18723b35.tar.xz
All MCSections are now required to have a SectionKind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77787 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCSection.h')
-rw-r--r--include/llvm/MC/MCSection.h23
1 files changed, 4 insertions, 19 deletions
diff --git a/include/llvm/MC/MCSection.h b/include/llvm/MC/MCSection.h
index 06d7e6af1e..5eb8559c90 100644
--- a/include/llvm/MC/MCSection.h
+++ b/include/llvm/MC/MCSection.h
@@ -31,35 +31,20 @@ namespace llvm {
MCSection(const MCSection&); // DO NOT IMPLEMENT
void operator=(const MCSection&); // DO NOT IMPLEMENT
protected:
- MCSection(const StringRef &Name, MCContext &Ctx);
- // FIXME: HACK.
+ MCSection(const StringRef &Name, SectionKind K, MCContext &Ctx);
SectionKind Kind;
public:
virtual ~MCSection();
- static MCSection *Create(const StringRef &Name, MCContext &Ctx);
+ static MCSection *Create(const StringRef &Name, SectionKind K,
+ 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 {
- MCSectionWithKind(const StringRef &Name, SectionKind K, MCContext &Ctx)
- : MCSection(Name, Ctx) {
- Kind = K;
- }
- public:
-
- static MCSectionWithKind *Create(const StringRef &Name, SectionKind K,
- MCContext &Ctx);
-
- };
-
-
- typedef MCSectionWithKind MCSectionELF;
+ typedef MCSection MCSectionELF;
} // end namespace llvm