[WebAssembly] Remove unneeded MCSymbolRefExpr variants
authorSam Clegg <sbc@chromium.org>
Fri, 22 Feb 2019 22:29:34 +0000 (22:29 +0000)
committerSam Clegg <sbc@chromium.org>
Fri, 22 Feb 2019 22:29:34 +0000 (22:29 +0000)
commit8fffa1dfa3bddf44b73a6f622eafa752347202f5
treee7f2e6050d2c9510bbc54a770b87e6b882985006
parent1e4f0735824abc9d618ae19b40b57dad2a5c5149
[WebAssembly] Remove unneeded MCSymbolRefExpr variants

We record the type of the symbol (event/function/data/global) in the
MCWasmSymbol and so it should always be clear how to handle a relocation
based on the symbol itself.

The exception is a function which still needs the special @TYPEINDEX
then the relocation contains the signature rather than the address
of the functions.

Differential Revision: https://reviews.llvm.org/D58472

llvm-svn: 354697
llvm/include/llvm/MC/MCExpr.h
llvm/lib/MC/MCExpr.cpp
llvm/lib/MC/WasmObjectWriter.cpp
llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp
llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.h
llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
llvm/test/MC/WebAssembly/annotations.s
llvm/test/MC/WebAssembly/assembler-binary.ll
llvm/test/MC/WebAssembly/basic-assembly.s