[PATCH] D43205: [WebAssembly] Fix casting MCSymbol to MCSymbolWasm on ELF

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 12:31:20 PST 2018


dschuff accepted this revision.
dschuff added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp:94
                              .getValueAsString();
-        getTargetStreamer()->emitImportModule(Sym, Name);
+        getTargetStreamer()->emitImportModule(WasmSym, Name);
       }
----------------
jgravelle-google wrote:
> dschuff wrote:
> > Does emitImportModule do anything for ELF? I assume not, maybe it makes more sense to just explicitly condition this whole thing on `BinFormatWasm` and that way when we remove ELF it will be easy to find all the mentions of BinFormatELF or BinFormatWasm in the backend and remove them.
> Yeah it just asserts if we actually do add a "wasm-import-module" attribute. This is less explicitly unsupported, but more refactorable in future.
Yeah my hope is that the "future" for ELF is short and does not include this attribute :)


Repository:
  rL LLVM

https://reviews.llvm.org/D43205





More information about the llvm-commits mailing list