summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCContext.cpp
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2018-05-02 23:11:38 +0000
committerSam Clegg <sbc@chromium.org>2018-05-02 23:11:38 +0000
commit4d57fbd02a8cb16045da65e078e72aa68e4ac21e (patch)
tree2bf4094560dd50406609a7227d4867883de5f594 /llvm/lib/MC/MCContext.cpp
parent87cc4dbde7446bfb5735f03c984ffb3983dc26be (diff)
downloadbcm5719-llvm-4d57fbd02a8cb16045da65e078e72aa68e4ac21e.tar.gz
bcm5719-llvm-4d57fbd02a8cb16045da65e078e72aa68e4ac21e.zip
[WebAssembly] MC: Create and use first class section symbols
Differential Revision: https://reviews.llvm.org/D46335 llvm-svn: 331413
Diffstat (limited to 'llvm/lib/MC/MCContext.cpp')
-rw-r--r--llvm/lib/MC/MCContext.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp
index ac9259a4d24..317cec5ab5e 100644
--- a/llvm/lib/MC/MCContext.cpp
+++ b/llvm/lib/MC/MCContext.cpp
@@ -516,8 +516,10 @@ MCSectionWasm *MCContext::getWasmSection(const Twine &Section, SectionKind Kind,
StringRef CachedName = Entry.first.SectionName;
MCSymbol *Begin = nullptr;
- if (BeginSymName)
- Begin = createTempSymbol(BeginSymName, false);
+ if (BeginSymName) {
+ Begin = createSymbol(BeginSymName, false, false);
+ cast<MCSymbolWasm>(Begin)->setType(wasm::WASM_SYMBOL_TYPE_SECTION);
+ }
MCSectionWasm *Result = new (WasmAllocator.Allocate())
MCSectionWasm(CachedName, Kind, GroupSym, UniqueID, Begin);
OpenPOWER on IntegriCloud