From 802fe81df39f59279e93ea46d547186b40528a64 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Tue, 19 Mar 2019 04:58:59 +0000 Subject: [WebAssembly] Change wasm.throw's first argument to an immediate 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 llvm-svn: 356436 --- clang/test/CodeGen/builtins-wasm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'clang/test/CodeGen/builtins-wasm.c') diff --git a/clang/test/CodeGen/builtins-wasm.c b/clang/test/CodeGen/builtins-wasm.c index 3c5db7268d2..4784d6ff86e 100644 --- a/clang/test/CodeGen/builtins-wasm.c +++ b/clang/test/CodeGen/builtins-wasm.c @@ -38,10 +38,10 @@ void data_drop() { // 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) { -- cgit v1.2.3