summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCSection.cpp
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
commit95bad379a9937d290d9f31f23fbc46b9949e02a3 (patch)
treef9806b26d4a229c00838ccd573f561460532667d /llvm/lib/MC/MCSection.cpp
parent2e6da95a601f95c3773445a0727b195874652a61 (diff)
downloadbcm5719-llvm-95bad379a9937d290d9f31f23fbc46b9949e02a3.tar.gz
bcm5719-llvm-95bad379a9937d290d9f31f23fbc46b9949e02a3.zip
All MCSections are now required to have a SectionKind.
llvm-svn: 77787
Diffstat (limited to 'llvm/lib/MC/MCSection.cpp')
-rw-r--r--llvm/lib/MC/MCSection.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/lib/MC/MCSection.cpp b/llvm/lib/MC/MCSection.cpp
index 2a2b0b6fafa..006546febb1 100644
--- a/llvm/lib/MC/MCSection.cpp
+++ b/llvm/lib/MC/MCSection.cpp
@@ -14,18 +14,15 @@ using namespace llvm;
MCSection::~MCSection() {
}
-MCSection::MCSection(const StringRef &N, MCContext &Ctx) : Name(N) {
+MCSection::MCSection(const StringRef &N, SectionKind K, MCContext &Ctx)
+ : Name(N), Kind(K) {
MCSection *&Entry = Ctx.Sections[Name];
assert(Entry == 0 && "Multiple sections with the same name created");
Entry = this;
}
-MCSection *MCSection::Create(const StringRef &Name, MCContext &Ctx) {
- return new (Ctx) MCSection(Name, Ctx);
+MCSection *MCSection::Create(const StringRef &Name, SectionKind K,
+ MCContext &Ctx) {
+ return new (Ctx) MCSection(Name, K, Ctx);
}
-
-MCSectionWithKind *
-MCSectionWithKind::Create(const StringRef &Name, SectionKind K, MCContext &Ctx){
- return new (Ctx) MCSectionWithKind(Name, K, Ctx);
-}
OpenPOWER on IntegriCloud