summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCWasmStreamer.cpp
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2018-05-02 23:01:10 +0000
committerSam Clegg <sbc@chromium.org>2018-05-02 23:01:10 +0000
commit87cc4dbde7446bfb5735f03c984ffb3983dc26be (patch)
tree72c1497608a7bec8b88a100815ef46f59bf4161b /llvm/lib/MC/MCWasmStreamer.cpp
parent9325c38fdb55db041ac19f24f7cafb5943e58cae (diff)
downloadbcm5719-llvm-87cc4dbde7446bfb5735f03c984ffb3983dc26be.tar.gz
bcm5719-llvm-87cc4dbde7446bfb5735f03c984ffb3983dc26be.zip
[MC] Factor MCObjectStreamer::addFragmentAtoms out of MachO streamer.
This code previously existed only in MCMachOStreamer but is useful for WebAssembly too. See: D46335 Differential Revision: https://reviews.llvm.org/D46297 llvm-svn: 331412
Diffstat (limited to 'llvm/lib/MC/MCWasmStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCWasmStreamer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCWasmStreamer.cpp b/llvm/lib/MC/MCWasmStreamer.cpp
index 2c77624b685..504c72cab97 100644
--- a/llvm/lib/MC/MCWasmStreamer.cpp
+++ b/llvm/lib/MC/MCWasmStreamer.cpp
@@ -198,6 +198,9 @@ void MCWasmStreamer::EmitInstToData(const MCInst &Inst,
void MCWasmStreamer::FinishImpl() {
EmitFrames(nullptr);
+ // Set fragment atoms so we can map from code fragment to defining symbol
+ addFragmentAtoms();
+
this->MCObjectStreamer::FinishImpl();
}
OpenPOWER on IntegriCloud