summaryrefslogtreecommitdiff
path: root/tools/llvm-mc/llvm-mc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-mc/llvm-mc.cpp')
-rw-r--r--tools/llvm-mc/llvm-mc.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp
index 11d8b963d1..44a8319cd6 100644
--- a/tools/llvm-mc/llvm-mc.cpp
+++ b/tools/llvm-mc/llvm-mc.cpp
@@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/MC/MCContext.h"
+#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/Support/CommandLine.h"
@@ -189,8 +190,8 @@ static int AssembleInput(const char *ProgName) {
OwningPtr<MCStreamer> Str(createAsmStreamer(Ctx, outs()));
// FIXME: Target hook & command line option for initial section.
- Str.get()->SwitchSection(Ctx.GetSection("__TEXT,__text,"
- "regular,pure_instructions"));
+ Str.get()->SwitchSection(MCSection::Create("__TEXT,__text,"
+ "regular,pure_instructions", Ctx));
AsmParser Parser(SrcMgr, Ctx, *Str.get());
OwningPtr<TargetAsmParser> TAP(GetTargetAsmParser(ProgName, Parser));