@@ -63,6 +63,12 @@ Library.OPTION_TYPE_MAPPER, new LlvmTypeMapper()
6363 /** see Core.h */
6464 public static native @ NotNull LlvmTypeRef LLVMIntTypeInContext (@ NotNull LlvmContextRef context , @ Unsigned int numBits );
6565
66+ /** see Core.h */
67+ public static native @ NotNull LlvmTypeRef LLVMFloatTypeInContext (@ NotNull LlvmContextRef context );
68+
69+ /** see Core.h */
70+ public static native @ NotNull LlvmTypeRef LLVMDoubleTypeInContext (@ NotNull LlvmContextRef context );
71+
6672 /** see Core.h */
6773 public static native @ NotNull LlvmTypeRef LLVMStructTypeInContext (@ NotNull LlvmContextRef context , @ NotNull NativePointerArray <LlvmTypeRef > elementTypes , @ ArraySizeOf ("elementTypes" ) int elementCount , @ LlvmBool int packed );
6874
@@ -211,6 +217,9 @@ public static native void LLVMAddModuleFlag(
211217 /** see Core.h */
212218 public static native void LLVMSetThreadLocalMode (@ NotNull LlvmValueRef globalVar , @ NotNull LlvmThreadLocalMode mode );
213219
220+ /** see Target.h */
221+ public static native @ NotNull LlvmTargetDataRef LLVMGetModuleDataLayout (LlvmModuleRef module );
222+
214223 /** see Target.h */
215224 public static native void LLVMSetModuleDataLayout (@ NotNull LlvmModuleRef module , @ NotNull LlvmTargetDataRef DL );
216225
@@ -220,6 +229,9 @@ public static native void LLVMAddModuleFlag(
220229 /** see Target.h */
221230 public static native @ Unsigned long LLVMOffsetOfElement (LlvmTargetDataRef TD , LlvmTypeRef structTy , @ Unsigned int element );
222231
232+ /** see Target.h */
233+ public static native @ Unsigned int LLVMABIAlignmentOfType (LlvmTargetDataRef TD , LlvmTypeRef ty );
234+
223235 /** see Core.h */
224236 public static native void LLVMDisposeMessage (@ NotNull Pointer message );
225237
@@ -697,5 +709,109 @@ public static native void LLVMAddIncoming(
697709 );
698710
699711 /** see DebugInfo.h */
700- public static native void LLVMSetSubprogram (@ NotNull LlvmValueRef func , @ NotNull LlvmMetadataRef subprogram );
712+ public static native void LLVMMetadataReplaceAllUsesWith (LlvmMetadataRef TempTargetMetadata , LlvmMetadataRef Replacement );
713+
714+ /** see DebugInfo.h */
715+ public static native @ NotNull LlvmMetadataRef LLVMDIBuilderCreateStructType (
716+ @ NotNull LlvmDiBuilderRef builder ,
717+ @ NotNull LlvmMetadataRef scope ,
718+ @ NotNull byte [] name ,
719+ @ NotNull @ ArraySizeOf ("name" ) NativeLong nameLen ,
720+ @ NotNull LlvmMetadataRef file ,
721+ @ Unsigned int lineNumber ,
722+ @ Unsigned long sizeInBits ,
723+ @ Unsigned int alignInBits ,
724+ @ NotNull NativeI32FlagGroup <LlvmDiFlags > Flags ,
725+ LlvmMetadataRef DerivedFrom ,
726+ @ NotNull NativePointerArray <LlvmMetadataRef > elements ,
727+ @ Unsigned int NumElements ,
728+ @ Unsigned int objectiveCRuntimeVersion ,
729+ LlvmMetadataRef VTableHolder ,
730+ @ NotNull byte [] uniqueId ,
731+ @ NotNull @ ArraySizeOf ("uniqueId" ) NativeLong uniqueIdLen
732+ );
733+
734+ /** see DebugInfo.h */
735+ public static native @ NotNull LlvmMetadataRef LLVMDIBuilderCreateReplaceableCompositeType (
736+ @ NotNull LlvmDiBuilderRef builder ,
737+ @ Unsigned int tag ,
738+ @ NotNull byte [] name ,
739+ @ NotNull @ ArraySizeOf ("name" ) NativeLong nameLen ,
740+ @ NotNull LlvmMetadataRef scope ,
741+ @ NotNull LlvmMetadataRef file ,
742+ @ Unsigned int lineNumber ,
743+ @ Unsigned int objectiveCRuntimeVersion ,
744+ @ Unsigned long sizeInBits ,
745+ @ Unsigned int alignInBits ,
746+ @ NotNull NativeI32FlagGroup <LlvmDiFlags > flags ,
747+ @ NotNull byte [] uniqueId ,
748+ @ NotNull @ ArraySizeOf ("uniqueId" ) NativeLong uniqueIdLen
749+ );
750+
751+ /** see DebugInfo.h */
752+ public static native @ NotNull LlvmMetadataRef LLVMDIBuilderCreatePointerType (
753+ @ NotNull LlvmDiBuilderRef builder ,
754+ @ NotNull LlvmMetadataRef pointeeType ,
755+ @ Unsigned long sizeInBits ,
756+ @ Unsigned int alignInBits ,
757+ @ Unsigned int addressSpace ,
758+ @ Nullable byte [] name ,
759+ @ Nullable @ ArraySizeOf ("name" ) NativeLong nameLen
760+ );
761+
762+ /** see DebugInfo.h */
763+ public static native @ NotNull LlvmMetadataRef LLVMDIBuilderCreateBasicType (
764+ @ NotNull LlvmDiBuilderRef builder ,
765+ @ NotNull byte [] name ,
766+ @ NotNull @ ArraySizeOf ("name" ) NativeLong nameLen ,
767+ long sizeInBits ,
768+ @ NotNull DwarfBaseTypeEncoding encoding ,
769+ @ NotNull NativeI32FlagGroup <LlvmDiFlags > flags
770+ );
771+
772+ /** see DebugInfo.h */
773+ public static native @ NotNull LlvmMetadataRef LLVMDIBuilderCreateMemberType (
774+ @ NotNull LlvmDiBuilderRef builder ,
775+ @ NotNull LlvmMetadataRef scope ,
776+ @ NotNull byte [] name ,
777+ @ NotNull @ ArraySizeOf ("name" ) NativeLong nameLen ,
778+ @ NotNull LlvmMetadataRef file ,
779+ @ Unsigned int lineNumber ,
780+ @ Unsigned long sizeInBits ,
781+ @ Unsigned long alignInBits ,
782+ @ Unsigned long offsetInBits ,
783+ @ NotNull NativeI32FlagGroup <LlvmDiFlags > Flags ,
784+ @ NotNull LlvmMetadataRef type
785+ );
786+
787+ public static native @ NotNull LlvmMetadataRef LLVMDIBuilderCreateArrayType (
788+ @ NotNull LlvmDiBuilderRef builder ,
789+ @ Unsigned long size ,
790+ @ Unsigned int alignInBits ,
791+ @ NotNull LlvmMetadataRef elementType ,
792+ @ Nullable NativePointerArray <LlvmMetadataRef > subscripts ,
793+ @ Unsigned int numSubscripts
794+ );
795+
796+ public static native @ NotNull LlvmMetadataRef LLVMDIBuilderCreateParameterVariable (
797+ @ NotNull LlvmDiBuilderRef builder ,
798+ @ NotNull LlvmMetadataRef scope ,
799+ @ NotNull byte [] name ,
800+ @ NotNull @ ArraySizeOf ("name" ) NativeLong nameLen ,
801+ @ Unsigned int argNo ,
802+ @ NotNull LlvmMetadataRef file ,
803+ @ Unsigned int lineNo ,
804+ @ NotNull LlvmMetadataRef type ,
805+ @ LlvmBool int alwaysPreserve ,
806+ @ NotNull NativeI32FlagGroup <LlvmDiFlags > flags
807+ );
808+
809+ /** see DebugInfo.h */
810+ public static native void LLVMSetSubprogram (@ NotNull LlvmValueRef func , @ Nullable LlvmMetadataRef subprogram );
811+
812+ /** see DebugInfo.h */
813+ public static native @ Unsigned long LLVMDITypeGetSizeInBits (LlvmMetadataRef diType );
814+
815+ /** see DebugInfo.h */
816+ public static native @ Unsigned int LLVMDITypeGetAlignInBits (LlvmMetadataRef diType );
701817}
0 commit comments