aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2021-06-15 01:49:43 -0700
committerHeejin Ahn <aheejin@gmail.com>2021-06-17 20:34:19 -0700
commit1d891d44f33f99c55e779acaeac4628e4ac9aaaf (patch)
treeed05e40d4fa4c7001f0da4a088f6e8fc54091091 /llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
parent6aaf4fa2885600b0e31042071ad06f78218ab0f2 (diff)
downloadllvm-1d891d44f33f99c55e779acaeac4628e4ac9aaaf.zip
llvm-1d891d44f33f99c55e779acaeac4628e4ac9aaaf.tar.gz
llvm-1d891d44f33f99c55e779acaeac4628e4ac9aaaf.tar.bz2
[WebAssembly] Rename event to tag
We recently decided to change 'event' to 'tag', and 'event section' to 'tag section', out of the rationale that the section contains a generalized tag that references a type, which may be used for something other than exceptions, and the name 'event' can be confusing in the web context. See - https://github.com/WebAssembly/exception-handling/issues/159#issuecomment-857910130 - https://github.com/WebAssembly/exception-handling/pull/161 Reviewed By: tlively Differential Revision: https://reviews.llvm.org/D104423
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
index 2468df9..93e5f23 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
@@ -116,11 +116,10 @@ MCSymbol *WebAssemblyMCInstLower::GetExternalSymbolSymbol(
SmallVector<wasm::ValType, 4> Returns;
SmallVector<wasm::ValType, 4> Params;
if (strcmp(Name, "__cpp_exception") == 0) {
- WasmSym->setType(wasm::WASM_SYMBOL_TYPE_EVENT);
+ WasmSym->setType(wasm::WASM_SYMBOL_TYPE_TAG);
// We can't confirm its signature index for now because there can be
// imported exceptions. Set it to be 0 for now.
- WasmSym->setEventType(
- {wasm::WASM_EVENT_ATTRIBUTE_EXCEPTION, /* SigIndex */ 0});
+ WasmSym->setTagType({wasm::WASM_TAG_ATTRIBUTE_EXCEPTION, /* SigIndex */ 0});
// We may have multiple C++ compilation units to be linked together, each of
// which defines the exception symbol. To resolve them, we declare them as
// weak.
@@ -179,8 +178,8 @@ MCOperand WebAssemblyMCInstLower::lowerSymbolOperand(const MachineOperand &MO,
report_fatal_error("Function addresses with offsets not supported");
if (WasmSym->isGlobal())
report_fatal_error("Global indexes with offsets not supported");
- if (WasmSym->isEvent())
- report_fatal_error("Event indexes with offsets not supported");
+ if (WasmSym->isTag())
+ report_fatal_error("Tag indexes with offsets not supported");
if (WasmSym->isTable())
report_fatal_error("Table indexes with offsets not supported");