Check properly has use list.

This commit is contained in:
Christoffer Lerno
2026-01-07 19:59:40 +01:00
parent fa2e6e8189
commit 4d93db51ee
3 changed files with 11 additions and 3 deletions

View File

@@ -75,6 +75,7 @@ bool llvm_link_mingw(const char **args, int arg_count, const char **error_string
bool llvm_ar(const char *out_name, const char **args, size_t count, int ArFormat);
LLVMValueRef LLVMConstBswap(LLVMValueRef ConstantVal);
bool LLVMHasUseList(LLVMValueRef value);
void LLVMBuilderSetFastMathFlags(LLVMBuilderRef Builder, FastMathOption option);
void LLVMSetDSOLocal(LLVMValueRef Global, bool value);
void LLVMSetTargetMachineUseInitArray(LLVMTargetMachineRef ref, bool use_init_array);

View File

@@ -356,6 +356,12 @@ void LLVMBuilderSetFastMathFlags(LLVMBuilderRef Builder, FastMathOption option)
llvm::unwrap(Builder)->setFastMathFlags(math_flags);
}
bool LLVMHasUseList(LLVMValueRef value)
{
llvm::Value *val = llvm::unwrap<llvm::Value>(value);
return val->hasUseList();
}
LLVMValueRef LLVMConstBswap(LLVMValueRef ConstantVal)
{
llvm::Constant *Val = llvm::unwrap<llvm::Constant>(ConstantVal);