Summary:
`wasm.throw` builtin's first 'tag' argument should be an immediate index
into the event section.
Reviewers: dschuff, craig.topper
Subscribers: sbc100, jgravelle-google, sunfish, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D59448
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356436
91177308-0d34-0410-b5e6-
96231b3b80d8
BUILTIN(__builtin_wasm_max_f64, "ddd", "nc")
// Exception handling builtins.
-TARGET_BUILTIN(__builtin_wasm_throw, "vUiv*", "r", "exception-handling")
+TARGET_BUILTIN(__builtin_wasm_throw, "vIUiv*", "r", "exception-handling")
TARGET_BUILTIN(__builtin_wasm_rethrow_in_catch, "v", "r", "exception-handling")
// Atomic wait and notify.
// WEBASSEMBLY64: call void @llvm.wasm.data.drop(i32 3)
}
-void throw(unsigned int tag, void *obj) {
- return __builtin_wasm_throw(tag, obj);
- // WEBASSEMBLY32: call void @llvm.wasm.throw(i32 %{{.*}}, i8* %{{.*}})
- // WEBASSEMBLY64: call void @llvm.wasm.throw(i32 %{{.*}}, i8* %{{.*}})
+void throw(void *obj) {
+ return __builtin_wasm_throw(0, obj);
+ // WEBASSEMBLY32: call void @llvm.wasm.throw(i32 0, i8* %{{.*}})
+ // WEBASSEMBLY64: call void @llvm.wasm.throw(i32 0, i8* %{{.*}})
}
void rethrow_in_catch(void) {