[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
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
index dab5161..437b07b 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
@@ -129,8 +129,8 @@
// Throwing an exception: throw / rethrow
let isTerminator = 1, hasCtrlDep = 1, isBarrier = 1 in {
-defm THROW : I<(outs), (ins event_op:$tag, variable_ops),
- (outs), (ins event_op:$tag),
+defm THROW : I<(outs), (ins tag_op:$tag, variable_ops),
+ (outs), (ins tag_op:$tag),
[(WebAssemblythrow (WebAssemblywrapper texternalsym:$tag))],
"throw \t$tag", "throw \t$tag", 0x08>;
defm RETHROW : NRI<(outs), (ins i32imm:$depth), [], "rethrow \t$depth", 0x09>;
@@ -149,9 +149,9 @@
let hasCtrlDep = 1, hasSideEffects = 1 in {
// Currently 'catch' can only extract an i32, which is sufficient for C++
// support, but according to the spec 'catch' can extract any number of values
-// based on the event type.
-defm CATCH : I<(outs I32:$dst), (ins event_op:$tag),
- (outs), (ins event_op:$tag),
+// based on the tag type.
+defm CATCH : I<(outs I32:$dst), (ins tag_op:$tag),
+ (outs), (ins tag_op:$tag),
[(set I32:$dst,
(WebAssemblycatch (WebAssemblywrapper texternalsym:$tag)))],
"catch \t$dst, $tag", "catch \t$tag", 0x07>;