Skip to content

Commit 698aa4d

Browse files
committed
Fix type cast
1 parent 87efdd1 commit 698aa4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/IR/Module.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ Napi::Value Module::getOrInsertGlobal(const Napi::CallbackInfo &info) {
205205
std::string functionName = info[0].As<Napi::String>();
206206
llvm::Type *type = Type::Extract(info[1]);
207207
llvm::Constant* glob = module->getOrInsertGlobal(functionName, type);
208-
return GlobalVariable::New(env, dyn_cast_or_null<llvm::GlobalVariable>(glob));
208+
return GlobalVariable::New(env, llvm::cast<llvm::GlobalVariable>(glob));
209209
}
210210
throw Napi::TypeError::New(env, ErrMsg::Class::Module::getOrInsertGlobal);
211211
}

0 commit comments

Comments
 (0)