From f71388e532895ba1640ea1e344402027d71d716b Mon Sep 17 00:00:00 2001 From: KitsuneAlex Date: Fri, 1 Dec 2023 00:53:09 +0100 Subject: [PATCH] fix(llvm) LLVMLookupIntrinsicID return type --- doc/notes/3.3.4.md | 1 + .../generated/java/org/lwjgl/llvm/LLVMCore.java | 14 ++++++++------ .../templates/kotlin/llvm/templates/LLVMCore.kt | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/notes/3.3.4.md b/doc/notes/3.3.4.md index e04428f12f..c0c980e74e 100644 --- a/doc/notes/3.3.4.md +++ b/doc/notes/3.3.4.md @@ -37,6 +37,7 @@ This build includes the following changes: - Core: Fixed callback wrapper memory leak with the CHM closure registry. (#927) - LLVM: Fixed `LLVMGetBufferStart` to return `ByteBuffer` instead of `String`. (#934) +- LLVM: Fixed `LookupIntrinsicID` to return `unsigned` instead of `void`. (#950) - tinyfd: The `aDefaultPath` parameter of `tinyfd_selectFolderDialog` is now nullable. (#922) #### Breaking Changes diff --git a/modules/lwjgl/llvm/src/generated/java/org/lwjgl/llvm/LLVMCore.java b/modules/lwjgl/llvm/src/generated/java/org/lwjgl/llvm/LLVMCore.java index eefdb389c2..c0cb898d98 100644 --- a/modules/lwjgl/llvm/src/generated/java/org/lwjgl/llvm/LLVMCore.java +++ b/modules/lwjgl/llvm/src/generated/java/org/lwjgl/llvm/LLVMCore.java @@ -7907,12 +7907,12 @@ public static void LLVMSetPersonalityFn(@NativeType("LLVMValueRef") long Fn, @Na // --- [ LLVMLookupIntrinsicID ] --- /** Unsafe version of: {@link #LLVMLookupIntrinsicID LookupIntrinsicID} */ - public static void nLLVMLookupIntrinsicID(long Name, long NameLen) { + public static int nLLVMLookupIntrinsicID(long Name, long NameLen) { long __functionAddress = Functions.LookupIntrinsicID; if (CHECKS) { check(__functionAddress); } - invokePPV(Name, NameLen, __functionAddress); + return invokePPI(Name, NameLen, __functionAddress); } /** @@ -7920,8 +7920,9 @@ public static void nLLVMLookupIntrinsicID(long Name, long NameLen) { * * @since 9 */ - public static void LLVMLookupIntrinsicID(@NativeType("char const *") ByteBuffer Name) { - nLLVMLookupIntrinsicID(memAddress(Name), Name.remaining()); + @NativeType("unsigned int") + public static int LLVMLookupIntrinsicID(@NativeType("char const *") ByteBuffer Name) { + return nLLVMLookupIntrinsicID(memAddress(Name), Name.remaining()); } /** @@ -7929,12 +7930,13 @@ public static void LLVMLookupIntrinsicID(@NativeType("char const *") ByteBuffer * * @since 9 */ - public static void LLVMLookupIntrinsicID(@NativeType("char const *") CharSequence Name) { + @NativeType("unsigned int") + public static int LLVMLookupIntrinsicID(@NativeType("char const *") CharSequence Name) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { int NameEncodedLength = stack.nUTF8(Name, false); long NameEncoded = stack.getPointerAddress(); - nLLVMLookupIntrinsicID(NameEncoded, NameEncodedLength); + return nLLVMLookupIntrinsicID(NameEncoded, NameEncodedLength); } finally { stack.setPointer(stackPointer); } diff --git a/modules/lwjgl/llvm/src/templates/kotlin/llvm/templates/LLVMCore.kt b/modules/lwjgl/llvm/src/templates/kotlin/llvm/templates/LLVMCore.kt index 9e6ba8db7d..e52ab437a6 100644 --- a/modules/lwjgl/llvm/src/templates/kotlin/llvm/templates/LLVMCore.kt +++ b/modules/lwjgl/llvm/src/templates/kotlin/llvm/templates/LLVMCore.kt @@ -3233,7 +3233,7 @@ val LLVMCore = "LLVMCore".nativeClass( LLVMValueRef("PersonalityFn", "") ) - IgnoreMissing..void( + IgnoreMissing..unsigned_int( "LookupIntrinsicID", "Obtain the intrinsic ID number which matches the given function name.",