<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi Sam,</div><div><br></div><div>I think your change is causing some WebAssembly tests to start failing.</div><div><br></div><div><div>Failing Tests (36):</div><div>  Â  LLVM :: CodeGen/WebAssembly/byval.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/call.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/cfg-stackify-eh.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/cfg-stackify.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/exception.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/f16.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/f32.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/f64.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/fast-isel-noreg.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/frem.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/function-bitcasts-varargs.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/function-bitcasts.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/global.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/i128.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/indirect-import.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/libcalls.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/lower-em-ehsjlj-options.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/lower-global-dtors.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/main-declaration.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/main-no-args.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/mem-intrinsics.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/muloti4.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/reg-stackify.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/returned.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/signext-arg.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/signext-zeroext.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/simd.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/stack-alignment.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/switch.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/umulo-128-legalisation-lowering.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/umulo-i64.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/unreachable.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/unsupported-function-bitcasts.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/unused-argument.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/userstack.ll</div><div>  Â  LLVM :: CodeGen/WebAssembly/varargs.ll</div><div><br></div><div>  Expected Passes  Â  : 29131</div><div>  Expected Failures  : 149</div><div>  Unsupported Tests  : 628</div><div>  Unexpected Failures: 36</div><div><br></div></div><div>Sample failure:</div><div>Output from test CodeGen/WebAssembly/cfg-stackify.ll<br></div><div><div>Command Output (stderr):</div><div>--</div><div>/llvm/test/CodeGen/WebAssembly/cfg-stackify.ll:1289:13: error: OPT-NEXT: expected string not found in input</div><div>; OPT-NEXT: call test15_callee1@FUNCTION{{$}}</div><div>  Â  Â  Â  Â  Â  ^</div><div><stdin>:813:2: note: scanning from here</div><div> call test15_callee1</div><div> ^</div><div><br></div></div><div>It looks like the expected strings in the test just need to updated in these tests.</div><div><br></div><div>Richard</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 22, 2019 at 2:28 PM Sam Clegg via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Author: sbc<br>
Date: Fri Feb 22 14:29:34 2019<br>
New Revision: 354697<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=354697&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=354697&view=rev</a><br>
Log:<br>
[WebAssembly] Remove unneeded MCSymbolRefExpr variants<br>
<br>
We record the type of the symbol (event/function/data/global) in the<br>
MCWasmSymbol and so it should always be clear how to handle a relocation<br>
based on the symbol itself.<br>
<br>
The exception is a function which still needs the special @TYPEINDEX<br>
then the relocation contains the signature rather than the address<br>
of the functions.<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D58472" rel="noreferrer" target="_blank">https://reviews.llvm.org/D58472</a><br>
<br>
Modified:<br>
  Â  llvm/trunk/include/llvm/MC/MCExpr.h<br>
  Â  llvm/trunk/lib/MC/MCExpr.cpp<br>
  Â  llvm/trunk/lib/MC/WasmObjectWriter.cpp<br>
  Â  llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp<br>
  Â  llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp<br>
  Â  llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.h<br>
  Â  llvm/trunk/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp<br>
  Â  llvm/trunk/test/MC/WebAssembly/annotations.s<br>
  Â  llvm/trunk/test/MC/WebAssembly/assembler-binary.ll<br>
  Â  llvm/trunk/test/MC/WebAssembly/basic-assembly.s<br>
<br>
Modified: llvm/trunk/include/llvm/MC/MCExpr.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCExpr.h?rev=354697&r1=354696&r2=354697&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCExpr.h?rev=354697&r1=354696&r2=354697&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/MC/MCExpr.h (original)<br>
+++ llvm/trunk/include/llvm/MC/MCExpr.h Fri Feb 22 14:29:34 2019<br>
@@ -284,10 +284,7 @@ public:<br>
  Â  Â VK_Hexagon_IE,<br>
  Â  Â VK_Hexagon_IE_GOT,<br>
<br>
-  Â  VK_WebAssembly_FUNCTION, // Function table index, rather than virtual addr<br>
-  Â  VK_WebAssembly_GLOBAL,  Â // Global object index<br>
-  Â  VK_WebAssembly_TYPEINDEX,// Type table index<br>
-  Â  VK_WebAssembly_EVENT,  Â  // Event index<br>
+  Â  VK_WebAssembly_TYPEINDEX,// Reference to a symbol's type (signature)<br>
<br>
  Â  Â VK_AMDGPU_GOTPCREL32_LO, // symbol@gotpcrel32@lo<br>
  Â  Â VK_AMDGPU_GOTPCREL32_HI, // symbol@gotpcrel32@hi<br>
<br>
Modified: llvm/trunk/lib/MC/MCExpr.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCExpr.cpp?rev=354697&r1=354696&r2=354697&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCExpr.cpp?rev=354697&r1=354696&r2=354697&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/MC/MCExpr.cpp (original)<br>
+++ llvm/trunk/lib/MC/MCExpr.cpp Fri Feb 22 14:29:34 2019<br>
@@ -302,10 +302,7 @@ StringRef MCSymbolRefExpr::getVariantKin<br>
  Â case VK_Hexagon_LD_PLT: return "LDPLT";<br>
  Â case VK_Hexagon_IE: return "IE";<br>
  Â case VK_Hexagon_IE_GOT: return "IEGOT";<br>
-  case VK_WebAssembly_FUNCTION: return "FUNCTION";<br>
-  case VK_WebAssembly_GLOBAL: return "GLOBAL";<br>
  Â case VK_WebAssembly_TYPEINDEX: return "TYPEINDEX";<br>
-  case VK_WebAssembly_EVENT: return "EVENT";<br>
  Â case VK_AMDGPU_GOTPCREL32_LO: return "gotpcrel32@lo";<br>
  Â case VK_AMDGPU_GOTPCREL32_HI: return "gotpcrel32@hi";<br>
  Â case VK_AMDGPU_REL32_LO: return "rel32@lo";<br>
@@ -418,10 +415,7 @@ MCSymbolRefExpr::getVariantKindForName(S<br>
  Â  Â .Case("lo8", VK_AVR_LO8)<br>
  Â  Â .Case("hi8", VK_AVR_HI8)<br>
  Â  Â .Case("hlo8", VK_AVR_HLO8)<br>
-  Â  .Case("function", VK_WebAssembly_FUNCTION)<br>
-  Â  .Case("global", VK_WebAssembly_GLOBAL)<br>
  Â  Â .Case("typeindex", VK_WebAssembly_TYPEINDEX)<br>
-  Â  .Case("event", VK_WebAssembly_EVENT)<br>
  Â  Â .Case("gotpcrel32@lo", VK_AMDGPU_GOTPCREL32_LO)<br>
  Â  Â .Case("gotpcrel32@hi", VK_AMDGPU_GOTPCREL32_HI)<br>
  Â  Â .Case("rel32@lo", VK_AMDGPU_REL32_LO)<br>
<br>
Modified: llvm/trunk/lib/MC/WasmObjectWriter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WasmObjectWriter.cpp?rev=354697&r1=354696&r2=354697&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WasmObjectWriter.cpp?rev=354697&r1=354696&r2=354697&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/MC/WasmObjectWriter.cpp (original)<br>
+++ llvm/trunk/lib/MC/WasmObjectWriter.cpp Fri Feb 22 14:29:34 2019<br>
@@ -1557,15 +1557,16 @@ uint64_t WasmObjectWriter::writeObject(M<br>
  Â  Â  Â assert(Fixup.getKind() ==<br>
  Â  Â  Â  Â  Â  Â  MCFixup::getKindForSize(is64Bit() ? 8 : 4, false));<br>
  Â  Â  Â const MCExpr *Expr = Fixup.getValue();<br>
-  Â  Â  auto *Sym = dyn_cast<MCSymbolRefExpr>(Expr);<br>
-  Â  Â  if (!Sym)<br>
+  Â  Â  auto *SymRef = dyn_cast<MCSymbolRefExpr>(Expr);<br>
+  Â  Â  if (!SymRef)<br>
  Â  Â  Â  Â report_fatal_error("fixups in .init_array should be symbol references");<br>
-  Â  Â  if (Sym->getKind() != MCSymbolRefExpr::VK_WebAssembly_FUNCTION)<br>
-  Â  Â  Â  report_fatal_error("symbols in .init_array should be for functions");<br>
-  Â  Â  if (Sym->getSymbol().getIndex() == InvalidIndex)<br>
+  Â  Â  const auto &TargetSym = cast<const MCSymbolWasm>(SymRef->getSymbol());<br>
+  Â  Â  if (TargetSym.getIndex() == InvalidIndex)<br>
  Â  Â  Â  Â report_fatal_error("symbols in .init_array should exist in symbtab");<br>
+  Â  Â  if (!TargetSym.isFunction())<br>
+  Â  Â  Â  report_fatal_error("symbols in .init_array should be for functions");<br>
  Â  Â  Â InitFuncs.push_back(<br>
-  Â  Â  Â  Â  std::make_pair(Priority, Sym->getSymbol().getIndex()));<br>
+  Â  Â  Â  Â  std::make_pair(Priority, TargetSym.getIndex()));<br>
  Â  Â }<br>
  Â }<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp?rev=354697&r1=354696&r2=354697&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp?rev=354697&r1=354696&r2=354697&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp (original)<br>
+++ llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp Fri Feb 22 14:29:34 2019<br>
@@ -42,23 +42,8 @@ private:<br>
 WebAssemblyWasmObjectWriter::WebAssemblyWasmObjectWriter(bool Is64Bit)<br>
  Â  Â : MCWasmObjectTargetWriter(Is64Bit) {}<br>
<br>
-// Test whether the given expression computes a function address.<br>
-static bool isFunctionExpr(const MCExpr *Expr) {<br>
-  if (auto SyExp = dyn_cast<MCSymbolRefExpr>(Expr))<br>
-  Â  return cast<MCSymbolWasm>(SyExp->getSymbol()).isFunction();<br>
-<br>
-  if (auto BinOp = dyn_cast<MCBinaryExpr>(Expr))<br>
-  Â  return isFunctionExpr(BinOp->getLHS()) != isFunctionExpr(BinOp->getRHS());<br>
-<br>
-  if (auto UnOp = dyn_cast<MCUnaryExpr>(Expr))<br>
-  Â  return isFunctionExpr(UnOp->getSubExpr());<br>
-<br>
-  return false;<br>
-}<br>
-<br>
-static bool isFunctionType(const MCValue &Target) {<br>
-  const MCSymbolRefExpr *RefA = Target.getSymA();<br>
-  return RefA && RefA->getKind() == MCSymbolRefExpr::VK_WebAssembly_TYPEINDEX;<br>
+static bool isFunctionSignatureRef(const MCSymbolRefExpr *Ref) {<br>
+  return Ref->getKind() == MCSymbolRefExpr::VK_WebAssembly_TYPEINDEX;<br>
 }<br>
<br>
 static const MCSection *getFixupSection(const MCExpr *Expr) {<br>
@@ -80,41 +65,33 @@ static const MCSection *getFixupSection(<br>
  Â return nullptr;<br>
 }<br>
<br>
-static bool isGlobalType(const MCValue &Target) {<br>
-  const MCSymbolRefExpr *RefA = Target.getSymA();<br>
-  return RefA && RefA->getKind() == MCSymbolRefExpr::VK_WebAssembly_GLOBAL;<br>
-}<br>
-<br>
-static bool isEventType(const MCValue &Target) {<br>
-  const MCSymbolRefExpr *RefA = Target.getSymA();<br>
-  return RefA && RefA->getKind() == MCSymbolRefExpr::VK_WebAssembly_EVENT;<br>
-}<br>
-<br>
 unsigned WebAssemblyWasmObjectWriter::getRelocType(const MCValue &Target,<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  const MCFixup &Fixup) const {<br>
-  // WebAssembly functions are not allocated in the data address space. To<br>
-  // resolve a pointer to a function, we must use a special relocation type.<br>
-  bool IsFunction = isFunctionExpr(Fixup.getValue());<br>
+  const MCSymbolRefExpr *RefA = Target.getSymA();<br>
+  assert(RefA);<br>
+  auto& SymA = cast<MCSymbolWasm>(RefA->getSymbol());<br>
<br>
  Â switch (unsigned(Fixup.getKind())) {<br>
  Â case WebAssembly::fixup_code_sleb128_i32:<br>
-  Â  if (IsFunction)<br>
+  Â  if (SymA.isFunction())<br>
  Â  Â  Â return wasm::R_WASM_TABLE_INDEX_SLEB;<br>
  Â  Â return wasm::R_WASM_MEMORY_ADDR_SLEB;<br>
  Â case WebAssembly::fixup_code_sleb128_i64:<br>
  Â  Â llvm_unreachable("fixup_sleb128_i64 not implemented yet");<br>
  Â case WebAssembly::fixup_code_uleb128_i32:<br>
-  Â  if (isGlobalType(Target))<br>
+  Â  if (SymA.isFunction()) {<br>
+  Â  Â  if (isFunctionSignatureRef(RefA))<br>
+  Â  Â  Â  return wasm::R_WASM_TYPE_INDEX_LEB;<br>
+  Â  Â  else<br>
+  Â  Â  Â  return wasm::R_WASM_FUNCTION_INDEX_LEB;<br>
+  Â  }<br>
+  Â  if (SymA.isGlobal())<br>
  Â  Â  Â return wasm::R_WASM_GLOBAL_INDEX_LEB;<br>
-  Â  if (isFunctionType(Target))<br>
-  Â  Â  return wasm::R_WASM_TYPE_INDEX_LEB;<br>
-  Â  if (IsFunction)<br>
-  Â  Â  return wasm::R_WASM_FUNCTION_INDEX_LEB;<br>
-  Â  if (isEventType(Target))<br>
+  Â  if (SymA.isEvent())<br>
  Â  Â  Â return wasm::R_WASM_EVENT_INDEX_LEB;<br>
  Â  Â return wasm::R_WASM_MEMORY_ADDR_LEB;<br>
  Â case FK_Data_4:<br>
-  Â  if (IsFunction)<br>
+  Â  if (SymA.isFunction())<br>
  Â  Â  Â return wasm::R_WASM_TABLE_INDEX_I32;<br>
  Â  Â if (auto Section = static_cast<const MCSectionWasm *>(<br>
  Â  Â  Â  Â  Â  Â getFixupSection(Fixup.getValue()))) {<br>
<br>
Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp?rev=354697&r1=354696&r2=354697&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp?rev=354697&r1=354696&r2=354697&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp (original)<br>
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp Fri Feb 22 14:29:34 2019<br>
@@ -332,15 +332,6 @@ void WebAssemblyAsmPrinter::EmitInstruct<br>
  Â }<br>
 }<br>
<br>
-const MCExpr *WebAssemblyAsmPrinter::lowerConstant(const Constant *CV) {<br>
-  if (const auto *GV = dyn_cast<GlobalValue>(CV))<br>
-  Â  if (GV->getValueType()->isFunctionTy()) {<br>
-  Â  Â  return MCSymbolRefExpr::create(<br>
-  Â  Â  Â  Â  getSymbol(GV), MCSymbolRefExpr::VK_WebAssembly_FUNCTION, OutContext);<br>
-  Â  }<br>
-  return AsmPrinter::lowerConstant(CV);<br>
-}<br>
-<br>
 bool WebAssemblyAsmPrinter::PrintAsmOperand(const MachineInstr *MI,<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â unsigned OpNo, unsigned AsmVariant,<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â const char *ExtraCode,<br>
<br>
Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.h?rev=354697&r1=354696&r2=354697&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.h?rev=354697&r1=354696&r2=354697&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.h (original)<br>
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.h Fri Feb 22 14:29:34 2019<br>
@@ -63,7 +63,6 @@ public:<br>
  Â void EmitConstantPool() override;<br>
  Â void EmitFunctionBodyStart() override;<br>
  Â void EmitInstruction(const MachineInstr *MI) override;<br>
-  const MCExpr *lowerConstant(const Constant *CV) override;<br>
  Â bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  unsigned AsmVariant, const char *ExtraCode,<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  raw_ostream &OS) override;<br>
<br>
Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp?rev=354697&r1=354696&r2=354697&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp?rev=354697&r1=354696&r2=354697&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp (original)<br>
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp Fri Feb 22 14:29:34 2019<br>
@@ -122,13 +122,8 @@ MCOperand WebAssemblyMCInstLower::lowerS<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  int64_t Offset,<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  bool IsFunc, bool IsGlob,<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  bool IsEvent) const {<br>
-  MCSymbolRefExpr::VariantKind VK =<br>
-  Â  Â  IsFunc ? MCSymbolRefExpr::VK_WebAssembly_FUNCTION<br>
-  Â  Â  Â  Â  Â  Â : IsGlob ? MCSymbolRefExpr::VK_WebAssembly_GLOBAL<br>
-  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  : IsEvent ? MCSymbolRefExpr::VK_WebAssembly_EVENT<br>
-  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  : MCSymbolRefExpr::VK_None;<br>
-<br>
-  const MCExpr *Expr = MCSymbolRefExpr::create(Sym, VK, Ctx);<br>
+  const MCExpr *Expr =<br>
+  Â  Â  MCSymbolRefExpr::create(Sym, MCSymbolRefExpr::VK_None, Ctx);<br>
<br>
  Â if (Offset != 0) {<br>
  Â  Â if (IsFunc)<br>
<br>
Modified: llvm/trunk/test/MC/WebAssembly/annotations.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/annotations.s?rev=354697&r1=354696&r2=354697&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/annotations.s?rev=354697&r1=354696&r2=354697&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/MC/WebAssembly/annotations.s (original)<br>
+++ llvm/trunk/test/MC/WebAssembly/annotations.s Fri Feb 22 14:29:34 2019<br>
@@ -28,7 +28,7 @@ test_annotation:<br>
  Â local.set 0<br>
  Â block  Â  i32<br>
  Â local.get 0<br>
-  br_on_exn 0, __cpp_exception@EVENT<br>
+  br_on_exn 0, __cpp_exception<br>
  Â rethrow<br>
  Â end_block<br>
  Â end_try<br>
@@ -59,7 +59,7 @@ test_annotation:<br>
 # CHECK-NEXT:  Â local.set 0<br>
 # CHECK-NEXT:  Â block  Â  i32<br>
 # CHECK-NEXT:  Â local.get 0<br>
-# CHECK-NEXT:  Â br_on_exn 0, __cpp_exception@EVENT # 0: down to label6<br>
+# CHECK-NEXT:  Â br_on_exn 0, __cpp_exception # 0: down to label6<br>
 # CHECK-NEXT:  Â rethrow  Â  Â  Â  Â  Â  Â  Â  Â  Â # to caller<br>
 # CHECK-NEXT:  Â end_block  Â  Â  Â  Â  Â  Â  Â  Â # label6:<br>
 # CHECK-NEXT:  Â end_try  Â  Â  Â  Â  Â  Â  Â  Â  Â # label5:<br>
<br>
Modified: llvm/trunk/test/MC/WebAssembly/assembler-binary.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/assembler-binary.ll?rev=354697&r1=354696&r2=354697&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/assembler-binary.ll?rev=354697&r1=354696&r2=354697&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/MC/WebAssembly/assembler-binary.ll (original)<br>
+++ llvm/trunk/test/MC/WebAssembly/assembler-binary.ll Fri Feb 22 14:29:34 2019<br>
@@ -26,7 +26,7 @@ entry:<br>
 ; ASM:  Â  Â  Â  Â .globl  foo<br>
 ; ASM:  Â  Â  foo:<br>
 ; ASM-NEXT:  Â  .functype  Â  Â  Â foo (i32) -> ()<br>
-; ASM-NEXT:  Â  call  Â  bar@FUNCTION<br>
+; ASM-NEXT:  Â  call  Â  bar<br>
 ; ASM-NEXT:  Â  end_function<br>
 ; ASM:  Â  Â  Â  Â .functype  Â  Â  Â bar () -> ()<br>
<br>
<br>
Modified: llvm/trunk/test/MC/WebAssembly/basic-assembly.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/basic-assembly.s?rev=354697&r1=354696&r2=354697&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/basic-assembly.s?rev=354697&r1=354696&r2=354697&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/MC/WebAssembly/basic-assembly.s (original)<br>
+++ llvm/trunk/test/MC/WebAssembly/basic-assembly.s Fri Feb 22 14:29:34 2019<br>
@@ -26,9 +26,9 @@ test0:<br>
  Â  Â br_if  Â  Â  Â 0  Â  Â  Â  # 0: down to label0<br>
 .LBB0_1:<br>
  Â  Â loop  Â  Â  Â  i32  Â  Â  # label1:<br>
-  Â  call  Â  Â  Â  something1@FUNCTION<br>
+  Â  call  Â  Â  Â  something1<br>
  Â  Â i64.const  Â 1234<br>
-  Â  i32.call  Â  something2@FUNCTION<br>
+  Â  i32.call  Â  something2<br>
  Â  Â i32.const  Â 0<br>
  Â  Â call_indirect 0<br>
  Â  Â i32.const  Â 1<br>
@@ -72,7 +72,7 @@ test0:<br>
  Â  Â local.set 0<br>
  Â  Â block  Â  Â  Â i32<br>
  Â  Â local.get 0<br>
-  Â  br_on_exn 0, __cpp_exception@EVENT<br>
+  Â  br_on_exn 0, __cpp_exception<br>
  Â  Â rethrow<br>
 .LBB0_4:<br>
  Â  Â end_block<br>
@@ -81,7 +81,7 @@ test0:<br>
  Â  Â throw 0<br>
 .LBB0_5:<br>
  Â  Â #i32.trunc_sat_f32_s<br>
-  Â  global.get  __stack_pointer@GLOBAL<br>
+  Â  global.get  __stack_pointer<br>
  Â  Â end_function<br>
  Â  Â .globaltype  Â  Â  Â  __stack_pointer, i32<br>
<br>
@@ -105,9 +105,9 @@ test0:<br>
 # CHECK-NEXT:  Â  Â  br_if 0  Â  Â  Â  Â  Â  # 0: down to label0<br>
 # CHECK-NEXT:  .LBB0_1:<br>
 # CHECK-NEXT:  Â  Â  loop  Â  Â  Â  i32  Â  Â  Â  Â # label1:<br>
-# CHECK-NEXT:  Â  Â  call  Â  Â  Â  something1@FUNCTION<br>
+# CHECK-NEXT:  Â  Â  call  Â  Â  Â  something1<br>
 # CHECK-NEXT:  Â  Â  i64.const  Â 1234<br>
-# CHECK-NEXT:  Â  Â  i32.call  Â  something2@FUNCTION<br>
+# CHECK-NEXT:  Â  Â  i32.call  Â  something2<br>
 # CHECK-NEXT:  Â  Â  i32.const  Â 0<br>
 # CHECK-NEXT:  Â  Â  call_indirect 0<br>
 # CHECK-NEXT:  Â  Â  i32.const  Â 1<br>
@@ -149,7 +149,7 @@ test0:<br>
 # CHECK-NEXT:  Â  Â  local.set 0<br>
 # CHECK-NEXT:  Â  Â  block  Â  Â  Â i32<br>
 # CHECK-NEXT:  Â  Â  local.get 0<br>
-# CHECK-NEXT:  Â  Â  br_on_exn 0, __cpp_exception@EVENT<br>
+# CHECK-NEXT:  Â  Â  br_on_exn 0, __cpp_exception<br>
 # CHECK-NEXT:  Â  Â  rethrow<br>
 # CHECK-NEXT:  .LBB0_4:<br>
 # CHECK-NEXT:  Â  Â  end_block<br>
@@ -157,7 +157,7 @@ test0:<br>
 # CHECK-NEXT:  Â  Â  i32.const 0<br>
 # CHECK-NEXT:  Â  Â  throw 0<br>
 # CHECK-NEXT:  .LBB0_5:<br>
-# CHECK-NEXT:  Â  Â  global.get  __stack_pointer@GLOBAL<br>
+# CHECK-NEXT:  Â  Â  global.get  __stack_pointer<br>
 # CHECK-NEXT:  Â  Â  end_function<br>
<br>
 # CHECK:  Â  Â  Â  Â  Â .globaltype __stack_pointer, i32<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div></div></div></div>