File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 8585#include " llvm/IR/IRBuilder.h"
8686#include " llvm/IR/IntrinsicsWebAssembly.h"
8787#include " llvm/IR/Module.h"
88+ #include " llvm/IR/RuntimeLibcalls.h"
8889#include " llvm/InitializePasses.h"
8990#include " llvm/Transforms/Utils/BasicBlockUtils.h"
9091
@@ -273,8 +274,13 @@ bool WasmEHPrepareImpl::prepareEHPads(Function &F) {
273274 // instruction selection.
274275 CatchF = Intrinsic::getOrInsertDeclaration (&M, Intrinsic::wasm_catch);
275276
277+ // FIXME: Verify this is really supported for current module.
278+ StringRef UnwindCallPersonalityName =
279+ RTLIB::RuntimeLibcallsInfo::getLibcallImplName (
280+ RTLIB::impl__Unwind_CallPersonality);
281+
276282 // _Unwind_CallPersonality() wrapper function, which calls the personality
277- CallPersonalityF = M.getOrInsertFunction (" _Unwind_CallPersonality " ,
283+ CallPersonalityF = M.getOrInsertFunction (UnwindCallPersonalityName ,
278284 IRB.getInt32Ty (), IRB.getPtrTy ());
279285 if (Function *F = dyn_cast<Function>(CallPersonalityF.getCallee ()))
280286 F->setDoesNotThrow ();
You can’t perform that action at this time.
0 commit comments