Skip to content

Commit

Permalink
Fix type cast
Browse files Browse the repository at this point in the history
  • Loading branch information
Lotes committed Aug 5, 2024
1 parent 87efdd1 commit 698aa4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/IR/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Napi::Value Module::getOrInsertGlobal(const Napi::CallbackInfo &info) {
std::string functionName = info[0].As<Napi::String>();
llvm::Type *type = Type::Extract(info[1]);
llvm::Constant* glob = module->getOrInsertGlobal(functionName, type);
return GlobalVariable::New(env, dyn_cast_or_null<llvm::GlobalVariable>(glob));
return GlobalVariable::New(env, llvm::cast<llvm::GlobalVariable>(glob));
}
throw Napi::TypeError::New(env, ErrMsg::Class::Module::getOrInsertGlobal);
}
Expand Down

0 comments on commit 698aa4d

Please sign in to comment.