summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCExpr.cpp
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2019-02-22 22:29:34 +0000
committerSam Clegg <sbc@chromium.org>2019-02-22 22:29:34 +0000
commit8fffa1dfa3bddf44b73a6f622eafa752347202f5 (patch)
treee7f2e6050d2c9510bbc54a770b87e6b882985006 /llvm/lib/MC/MCExpr.cpp
parent1e4f0735824abc9d618ae19b40b57dad2a5c5149 (diff)
downloadbcm5719-llvm-8fffa1dfa3bddf44b73a6f622eafa752347202f5.tar.gz
bcm5719-llvm-8fffa1dfa3bddf44b73a6f622eafa752347202f5.zip
[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
Diffstat (limited to 'llvm/lib/MC/MCExpr.cpp')
-rw-r--r--llvm/lib/MC/MCExpr.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp
index 7ca935f248d..749c3232cfc 100644
--- a/llvm/lib/MC/MCExpr.cpp
+++ b/llvm/lib/MC/MCExpr.cpp
@@ -302,10 +302,7 @@ StringRef MCSymbolRefExpr::getVariantKindName(VariantKind Kind) {
case VK_Hexagon_LD_PLT: return "LDPLT";
case VK_Hexagon_IE: return "IE";
case VK_Hexagon_IE_GOT: return "IEGOT";
- case VK_WebAssembly_FUNCTION: return "FUNCTION";
- case VK_WebAssembly_GLOBAL: return "GLOBAL";
case VK_WebAssembly_TYPEINDEX: return "TYPEINDEX";
- case VK_WebAssembly_EVENT: return "EVENT";
case VK_AMDGPU_GOTPCREL32_LO: return "gotpcrel32@lo";
case VK_AMDGPU_GOTPCREL32_HI: return "gotpcrel32@hi";
case VK_AMDGPU_REL32_LO: return "rel32@lo";
@@ -418,10 +415,7 @@ MCSymbolRefExpr::getVariantKindForName(StringRef Name) {
.Case("lo8", VK_AVR_LO8)
.Case("hi8", VK_AVR_HI8)
.Case("hlo8", VK_AVR_HLO8)
- .Case("function", VK_WebAssembly_FUNCTION)
- .Case("global", VK_WebAssembly_GLOBAL)
.Case("typeindex", VK_WebAssembly_TYPEINDEX)
- .Case("event", VK_WebAssembly_EVENT)
.Case("gotpcrel32@lo", VK_AMDGPU_GOTPCREL32_LO)
.Case("gotpcrel32@hi", VK_AMDGPU_GOTPCREL32_HI)
.Case("rel32@lo", VK_AMDGPU_REL32_LO)
OpenPOWER on IntegriCloud