From: Heejin Ahn Date: Fri, 15 Sep 2017 22:01:22 +0000 (+0000) Subject: Remove __builtin_wasm_rethrow builtin X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=76889b5ed5baef12d4f2888f7ff9fee677c940c3;p=clang Remove __builtin_wasm_rethrow builtin Summary: Remove `__builtin_wasm_rethrow` builtin. I thought it was required to implement `__cxa_rethrow` function in libcxxabi, but it turned out it will be using `__builtin_wasm_throw` instead. Reviewers: dschuff, jgravelle-google Reviewed By: jgravelle-google Subscribers: jfb, sbc100, jgravelle-google Differential Revision: https://reviews.llvm.org/D37931 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313402 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/BuiltinsWebAssembly.def b/include/clang/Basic/BuiltinsWebAssembly.def index 19318dcebb..e9d8ea6325 100644 --- a/include/clang/Basic/BuiltinsWebAssembly.def +++ b/include/clang/Basic/BuiltinsWebAssembly.def @@ -23,6 +23,5 @@ BUILTIN(__builtin_wasm_grow_memory, "zz", "n") // Exception handling builtins. BUILTIN(__builtin_wasm_throw, "vUiv*", "r") -BUILTIN(__builtin_wasm_rethrow, "v", "r") #undef BUILTIN diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp index 971cecfb48..4240d2de53 100644 --- a/lib/CodeGen/CGBuiltin.cpp +++ b/lib/CodeGen/CGBuiltin.cpp @@ -9574,10 +9574,6 @@ Value *CodeGenFunction::EmitWebAssemblyBuiltinExpr(unsigned BuiltinID, Value *Callee = CGM.getIntrinsic(Intrinsic::wasm_throw); return Builder.CreateCall(Callee, {Tag, Obj}); } - case WebAssembly::BI__builtin_wasm_rethrow: { - Value *Callee = CGM.getIntrinsic(Intrinsic::wasm_rethrow); - return Builder.CreateCall(Callee); - } default: return nullptr; diff --git a/test/CodeGen/builtins-wasm.c b/test/CodeGen/builtins-wasm.c index e0f72d2e50..2361fdf40c 100644 --- a/test/CodeGen/builtins-wasm.c +++ b/test/CodeGen/builtins-wasm.c @@ -20,9 +20,3 @@ void f3(unsigned int tag, void *obj) { // WEBASSEMBLY32: call void @llvm.wasm.throw(i32 %{{.*}}, i8* %{{.*}}) // WEBASSEMBLY64: call void @llvm.wasm.throw(i32 %{{.*}}, i8* %{{.*}}) } - -void f4() { - return __builtin_wasm_rethrow(); -// WEBASSEMBLY32: call void @llvm.wasm.rethrow() -// WEBASSEMBLY64: call void @llvm.wasm.rethrow() -}