diff options
author | Sam Clegg <sbc@chromium.org> | 2018-05-02 23:01:10 +0000 |
---|---|---|
committer | Sam Clegg <sbc@chromium.org> | 2018-05-02 23:01:10 +0000 |
commit | 87cc4dbde7446bfb5735f03c984ffb3983dc26be (patch) | |
tree | 72c1497608a7bec8b88a100815ef46f59bf4161b /llvm/lib/MC/MCWasmStreamer.cpp | |
parent | 9325c38fdb55db041ac19f24f7cafb5943e58cae (diff) | |
download | bcm5719-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.cpp | 3 |
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(); } |