]> granicus.if.org Git - clang/commitdiff
Remove __builtin_wasm_rethrow builtin
authorHeejin Ahn <aheejin@gmail.com>
Fri, 15 Sep 2017 22:01:22 +0000 (22:01 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Fri, 15 Sep 2017 22:01:22 +0000 (22:01 +0000)
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

include/clang/Basic/BuiltinsWebAssembly.def
lib/CodeGen/CGBuiltin.cpp
test/CodeGen/builtins-wasm.c

index 19318dcebb9ec2f6f76436da021ee215c6882892..e9d8ea63256536093850017161cc1963f88f63a4 100644 (file)
@@ -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
index 971cecfb4843105157a5590cebaac5b8ffe577f0..4240d2de53660c495c1d123655e47dbc5494be85 100644 (file)
@@ -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;
index e0f72d2e503417517fec56432486aa276cfd0912..2361fdf40ce39873aa056d9d65cf84d9fb26ea3b 100644 (file)
@@ -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()
-}