From 698aa4d3788a9268632efc6d69ea5ca60453ac2b Mon Sep 17 00:00:00 2001 From: Markus Rudolph Date: Mon, 5 Aug 2024 14:44:06 +0200 Subject: [PATCH] Fix type cast --- src/IR/Module.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IR/Module.cpp b/src/IR/Module.cpp index 56c1a3b..c84fe7c 100644 --- a/src/IR/Module.cpp +++ b/src/IR/Module.cpp @@ -205,7 +205,7 @@ Napi::Value Module::getOrInsertGlobal(const Napi::CallbackInfo &info) { std::string functionName = info[0].As(); llvm::Type *type = Type::Extract(info[1]); llvm::Constant* glob = module->getOrInsertGlobal(functionName, type); - return GlobalVariable::New(env, dyn_cast_or_null(glob)); + return GlobalVariable::New(env, llvm::cast(glob)); } throw Napi::TypeError::New(env, ErrMsg::Class::Module::getOrInsertGlobal); }