[llvm-14-fixes] use specific LLVMConst* codepaths for LLVM 14

This commit is contained in:
A1029384756
2025-10-09 12:03:25 -04:00
parent 750c654536
commit be9384fc8d
2 changed files with 35 additions and 31 deletions

View File

@@ -449,31 +449,6 @@ gb_internal LLVMValueRef llvm_const_insert_value(lbModule *m, LLVMValueRef agg,
}
gb_internal LLVMValueRef llvm_const_shl(lbModule *m, LLVMValueRef a, LLVMValueRef b) {
LLVMValueRef res = LLVMBuildShl(m->const_dummy_builder, a, b, "");
GB_ASSERT(LLVMIsConstant(res));
return res;
}
gb_internal LLVMValueRef llvm_const_lshr(lbModule *m, LLVMValueRef a, LLVMValueRef b) {
LLVMValueRef res = LLVMBuildLShr(m->const_dummy_builder, a, b, "");
GB_ASSERT(LLVMIsConstant(res));
return res;
}
gb_internal LLVMValueRef llvm_const_or(lbModule *m, LLVMValueRef a, LLVMValueRef b) {
LLVMValueRef res = LLVMBuildOr(m->const_dummy_builder, a, b, "");
GB_ASSERT(LLVMIsConstant(res));
return res;
}
gb_internal LLVMValueRef llvm_const_zext(lbModule *m, LLVMValueRef a, LLVMTypeRef b) {
LLVMValueRef res = LLVMBuildZExt(m->const_dummy_builder, a, b, "");
GB_ASSERT(LLVMIsConstant(res));
return res;
}
gb_internal LLVMValueRef llvm_cstring(lbModule *m, String const &str) {