1use super::*;
4
5extern "C" {
7 pub fn LLVMShutdown();
8 pub fn LLVMGetVersion(
9 Major: *mut ::libc::c_uint,
10 Minor: *mut ::libc::c_uint,
11 Patch: *mut ::libc::c_uint,
12 );
13 pub fn LLVMCreateMessage(Message: *const ::libc::c_char) -> *mut ::libc::c_char;
14 pub fn LLVMDisposeMessage(Message: *mut ::libc::c_char);
15}
16
17extern "C" {
19 pub fn LLVMContextCreate() -> LLVMContextRef;
20 pub fn LLVMGetGlobalContext() -> LLVMContextRef;
21 pub fn LLVMContextSetDiagnosticHandler(
22 C: LLVMContextRef,
23 Handler: LLVMDiagnosticHandler,
24 DiagnosticContext: *mut ::libc::c_void,
25 );
26 pub fn LLVMContextGetDiagnosticHandler(C: LLVMContextRef) -> LLVMDiagnosticHandler;
28 pub fn LLVMContextGetDiagnosticContext(C: LLVMContextRef) -> *mut ::libc::c_void;
30 pub fn LLVMContextSetYieldCallback(
31 C: LLVMContextRef,
32 Callback: LLVMYieldCallback,
33 OpaqueHandle: *mut ::libc::c_void,
34 );
35 pub fn LLVMContextShouldDiscardValueNames(C: LLVMContextRef) -> LLVMBool;
36 pub fn LLVMContextSetDiscardValueNames(C: LLVMContextRef, Discard: LLVMBool);
37 pub fn LLVMContextDispose(C: LLVMContextRef);
38 pub fn LLVMGetDiagInfoDescription(DI: LLVMDiagnosticInfoRef) -> *mut ::libc::c_char;
39 pub fn LLVMGetDiagInfoSeverity(DI: LLVMDiagnosticInfoRef) -> LLVMDiagnosticSeverity;
40 pub fn LLVMGetMDKindIDInContext(
41 C: LLVMContextRef,
42 Name: *const ::libc::c_char,
43 SLen: ::libc::c_uint,
44 ) -> ::libc::c_uint;
45 pub fn LLVMGetMDKindID(Name: *const ::libc::c_char, SLen: ::libc::c_uint) -> ::libc::c_uint;
46
47 pub fn LLVMGetEnumAttributeKindForName(
57 Name: *const ::libc::c_char,
58 SLen: ::libc::size_t,
59 ) -> ::libc::c_uint;
60 pub fn LLVMGetLastEnumAttributeKind() -> ::libc::c_uint;
61
62 pub fn LLVMCreateEnumAttribute(
64 C: LLVMContextRef,
65 KindID: ::libc::c_uint,
66 Val: u64,
67 ) -> LLVMAttributeRef;
68 pub fn LLVMGetEnumAttributeKind(A: LLVMAttributeRef) -> ::libc::c_uint;
70 pub fn LLVMGetEnumAttributeValue(A: LLVMAttributeRef) -> u64;
74
75 pub fn LLVMCreateTypeAttribute(
77 C: LLVMContextRef,
78 KindID: ::libc::c_uint,
79 type_ref: LLVMTypeRef,
80 ) -> LLVMAttributeRef;
81 pub fn LLVMGetTypeAttributeValue(A: LLVMAttributeRef) -> LLVMTypeRef;
83
84 pub fn LLVMCreateConstantRangeAttribute(
89 C: LLVMContextRef,
90 KindID: ::libc::c_uint,
91 NumBits: ::libc::c_uint,
92 LowerWords: *const u64,
93 UpperWords: *const u64,
94 ) -> LLVMAttributeRef;
95
96 pub fn LLVMCreateStringAttribute(
98 C: LLVMContextRef,
99 K: *const ::libc::c_char,
100 KLength: ::libc::c_uint,
101 V: *const ::libc::c_char,
102 VLength: ::libc::c_uint,
103 ) -> LLVMAttributeRef;
104 pub fn LLVMGetStringAttributeKind(
106 A: LLVMAttributeRef,
107 Length: *mut ::libc::c_uint,
108 ) -> *const ::libc::c_char;
109 pub fn LLVMGetStringAttributeValue(
111 A: LLVMAttributeRef,
112 Length: *mut ::libc::c_uint,
113 ) -> *const ::libc::c_char;
114 pub fn LLVMIsEnumAttribute(A: LLVMAttributeRef) -> LLVMBool;
115 pub fn LLVMIsStringAttribute(A: LLVMAttributeRef) -> LLVMBool;
116 pub fn LLVMIsTypeAttribute(A: LLVMAttributeRef) -> LLVMBool;
117
118 pub fn LLVMGetTypeByName2(C: LLVMContextRef, Name: *const ::libc::c_char) -> LLVMTypeRef;
120}
121
122extern "C" {
124 pub fn LLVMModuleCreateWithName(ModuleID: *const ::libc::c_char) -> LLVMModuleRef;
125 pub fn LLVMModuleCreateWithNameInContext(
126 ModuleID: *const ::libc::c_char,
127 C: LLVMContextRef,
128 ) -> LLVMModuleRef;
129 pub fn LLVMCloneModule(M: LLVMModuleRef) -> LLVMModuleRef;
130 pub fn LLVMDisposeModule(M: LLVMModuleRef);
131
132 pub fn LLVMIsNewDbgInfoFormat(M: LLVMModuleRef) -> LLVMBool;
138
139 pub fn LLVMSetIsNewDbgInfoFormat(M: LLVMModuleRef, UseNewFormat: LLVMBool);
143
144 pub fn LLVMGetModuleIdentifier(
148 M: LLVMModuleRef,
149 Len: *mut ::libc::size_t,
150 ) -> *const ::libc::c_char;
151 pub fn LLVMSetModuleIdentifier(
155 M: LLVMModuleRef,
156 Ident: *const ::libc::c_char,
157 Len: ::libc::size_t,
158 );
159
160 pub fn LLVMGetSourceFileName(
164 M: LLVMModuleRef,
165 Len: *mut ::libc::size_t,
166 ) -> *const ::libc::c_char;
167 pub fn LLVMSetSourceFileName(
169 M: LLVMModuleRef,
170 Name: *const ::libc::c_char,
171 Len: ::libc::size_t,
172 );
173
174 #[deprecated(since = "3.9", note = "Confusingly named. Use LLVMGetDataLayoutStr.")]
175 pub fn LLVMGetDataLayout(M: LLVMModuleRef) -> *const ::libc::c_char;
176 pub fn LLVMGetDataLayoutStr(M: LLVMModuleRef) -> *const ::libc::c_char;
178 pub fn LLVMSetDataLayout(M: LLVMModuleRef, DataLayoutStr: *const ::libc::c_char);
179 pub fn LLVMGetTarget(M: LLVMModuleRef) -> *const ::libc::c_char;
180 pub fn LLVMSetTarget(M: LLVMModuleRef, Triple: *const ::libc::c_char);
181
182 pub fn LLVMCopyModuleFlagsMetadata(
184 M: LLVMModuleRef,
185 Len: *mut ::libc::size_t,
186 ) -> *mut LLVMModuleFlagEntry;
187 pub fn LLVMDisposeModuleFlagsMetadata(Entries: *mut LLVMModuleFlagEntry);
189 pub fn LLVMModuleFlagEntriesGetFlagBehavior(
191 Entries: *mut LLVMModuleFlagEntry,
192 Index: ::libc::c_uint,
193 ) -> LLVMModuleFlagBehavior;
194 pub fn LLVMModuleFlagEntriesGetKey(
196 Entries: *mut LLVMModuleFlagEntry,
197 Index: ::libc::c_uint,
198 Len: *mut ::libc::size_t,
199 ) -> *const ::libc::c_char;
200 pub fn LLVMModuleFlagEntriesGetMetadata(
202 Entries: *mut LLVMModuleFlagEntry,
203 Index: ::libc::c_uint,
204 ) -> LLVMMetadataRef;
205 pub fn LLVMGetModuleFlag(
207 M: LLVMModuleRef,
208 Key: *const ::libc::c_char,
209 KeyLen: ::libc::size_t,
210 ) -> LLVMMetadataRef;
211 pub fn LLVMAddModuleFlag(
213 M: LLVMModuleRef,
214 Behavior: LLVMModuleFlagBehavior,
215 Key: *const ::libc::c_char,
216 KeyLen: ::libc::size_t,
217 Val: LLVMMetadataRef,
218 );
219
220 pub fn LLVMDumpModule(M: LLVMModuleRef);
221 pub fn LLVMPrintModuleToFile(
222 M: LLVMModuleRef,
223 Filename: *const ::libc::c_char,
224 ErrorMessage: *mut *mut ::libc::c_char,
225 ) -> LLVMBool;
226 pub fn LLVMPrintModuleToString(M: LLVMModuleRef) -> *mut ::libc::c_char;
227
228 pub fn LLVMGetModuleInlineAsm(
229 M: LLVMModuleRef,
230 Len: *mut ::libc::size_t,
231 ) -> *const ::libc::c_char;
232 #[deprecated(since = "7.0", note = "Use LLVMSetModuleInlineAsm2 instead")]
233 pub fn LLVMSetModuleInlineAsm(M: LLVMModuleRef, Asm: *const ::libc::c_char);
234 pub fn LLVMSetModuleInlineAsm2(
235 M: LLVMModuleRef,
236 Asm: *const ::libc::c_char,
237 Len: ::libc::size_t,
238 );
239 pub fn LLVMAppendModuleInlineAsm(
240 M: LLVMModuleRef,
241 Asm: *const ::libc::c_char,
242 Len: ::libc::size_t,
243 );
244 pub fn LLVMGetInlineAsm(
245 Ty: LLVMTypeRef,
246 AsmString: *const ::libc::c_char,
247 AsmStringSize: ::libc::size_t,
248 Constraints: *const ::libc::c_char,
249 ConstraintsSize: ::libc::size_t,
250 HasSideEffects: LLVMBool,
251 IsAlignStack: LLVMBool,
252 Dialect: LLVMInlineAsmDialect,
253 CanThrow: LLVMBool,
254 ) -> LLVMValueRef;
255
256 pub fn LLVMGetInlineAsmAsmString(
258 InlineAsmVal: LLVMValueRef,
259 Len: *mut ::libc::size_t,
260 ) -> *const ::libc::c_char;
261
262 pub fn LLVMGetInlineAsmConstraintString(
264 InlineAsmVal: LLVMValueRef,
265 Len: *mut ::libc::size_t,
266 ) -> *const ::libc::c_char;
267
268 pub fn LLVMGetInlineAsmDialect(InlineAsmVal: LLVMValueRef) -> LLVMInlineAsmDialect;
270
271 pub fn LLVMGetInlineAsmFunctionType(InlineAsmVal: LLVMValueRef) -> LLVMTypeRef;
275
276 pub fn LLVMGetInlineAsmHasSideEffects(InlineAsmVal: LLVMValueRef) -> LLVMBool;
278
279 pub fn LLVMGetInlineAsmNeedsAlignedStack(InlineAsmVal: LLVMValueRef) -> LLVMBool;
281
282 pub fn LLVMGetInlineAsmCanUnwind(InlineAsmVal: LLVMValueRef) -> LLVMBool;
284
285 pub fn LLVMGetModuleContext(M: LLVMModuleRef) -> LLVMContextRef;
286 #[deprecated(since = "12.0.0", note = "Use LLVMGetTypeByName2 instead")]
287 pub fn LLVMGetTypeByName(M: LLVMModuleRef, Name: *const ::libc::c_char) -> LLVMTypeRef;
288 pub fn LLVMGetFirstNamedMetadata(M: LLVMModuleRef) -> LLVMNamedMDNodeRef;
289 pub fn LLVMGetLastNamedMetadata(M: LLVMModuleRef) -> LLVMNamedMDNodeRef;
290 pub fn LLVMGetNextNamedMetadata(NamedMDNode: LLVMNamedMDNodeRef) -> LLVMNamedMDNodeRef;
291 pub fn LLVMGetPreviousNamedMetadata(NamedMDNode: LLVMNamedMDNodeRef) -> LLVMNamedMDNodeRef;
292 pub fn LLVMGetNamedMetadata(
293 M: LLVMModuleRef,
294 Name: *const ::libc::c_char,
295 NameLen: ::libc::size_t,
296 ) -> LLVMNamedMDNodeRef;
297 pub fn LLVMGetOrInsertNamedMetadata(
298 M: LLVMModuleRef,
299 Name: *const ::libc::c_char,
300 NameLen: ::libc::size_t,
301 ) -> LLVMNamedMDNodeRef;
302 pub fn LLVMGetNamedMetadataName(
303 NamedMD: LLVMNamedMDNodeRef,
304 NameLen: *mut ::libc::size_t,
305 ) -> *const ::libc::c_char;
306 pub fn LLVMGetNamedMetadataNumOperands(
307 M: LLVMModuleRef,
308 name: *const ::libc::c_char,
309 ) -> ::libc::c_uint;
310 pub fn LLVMGetNamedMetadataOperands(
311 M: LLVMModuleRef,
312 name: *const ::libc::c_char,
313 Dest: *mut LLVMValueRef,
314 );
315 pub fn LLVMAddNamedMetadataOperand(
316 M: LLVMModuleRef,
317 name: *const ::libc::c_char,
318 Val: LLVMValueRef,
319 );
320 pub fn LLVMGetDebugLocDirectory(
321 Val: LLVMValueRef,
322 Length: *mut ::libc::c_uint,
323 ) -> *const ::libc::c_char;
324 pub fn LLVMGetDebugLocFilename(
325 Val: LLVMValueRef,
326 Length: *mut ::libc::c_uint,
327 ) -> *const ::libc::c_char;
328 pub fn LLVMGetDebugLocLine(Val: LLVMValueRef) -> ::libc::c_uint;
329 pub fn LLVMGetDebugLocColumn(Val: LLVMValueRef) -> ::libc::c_uint;
330 pub fn LLVMAddFunction(
331 M: LLVMModuleRef,
332 Name: *const ::libc::c_char,
333 FunctionTy: LLVMTypeRef,
334 ) -> LLVMValueRef;
335 pub fn LLVMGetNamedFunction(M: LLVMModuleRef, Name: *const ::libc::c_char) -> LLVMValueRef;
336 pub fn LLVMGetFirstFunction(M: LLVMModuleRef) -> LLVMValueRef;
337 pub fn LLVMGetLastFunction(M: LLVMModuleRef) -> LLVMValueRef;
338 pub fn LLVMGetNextFunction(Fn: LLVMValueRef) -> LLVMValueRef;
339 pub fn LLVMGetPreviousFunction(Fn: LLVMValueRef) -> LLVMValueRef;
340}
341
342extern "C" {
344 pub fn LLVMGetTypeKind(Ty: LLVMTypeRef) -> LLVMTypeKind;
345 pub fn LLVMTypeIsSized(Ty: LLVMTypeRef) -> LLVMBool;
346 pub fn LLVMGetTypeContext(Ty: LLVMTypeRef) -> LLVMContextRef;
347 pub fn LLVMDumpType(Val: LLVMTypeRef);
348 pub fn LLVMPrintTypeToString(Val: LLVMTypeRef) -> *mut ::libc::c_char;
349
350 pub fn LLVMInt1TypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
352 pub fn LLVMInt8TypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
353 pub fn LLVMInt16TypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
354 pub fn LLVMInt32TypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
355 pub fn LLVMInt64TypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
356 pub fn LLVMInt128TypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
357 pub fn LLVMIntTypeInContext(C: LLVMContextRef, NumBits: ::libc::c_uint) -> LLVMTypeRef;
358 pub fn LLVMInt1Type() -> LLVMTypeRef;
359 pub fn LLVMInt8Type() -> LLVMTypeRef;
360 pub fn LLVMInt16Type() -> LLVMTypeRef;
361 pub fn LLVMInt32Type() -> LLVMTypeRef;
362 pub fn LLVMInt64Type() -> LLVMTypeRef;
363 pub fn LLVMInt128Type() -> LLVMTypeRef;
364 pub fn LLVMIntType(NumBits: ::libc::c_uint) -> LLVMTypeRef;
365 pub fn LLVMGetIntTypeWidth(IntegerTy: LLVMTypeRef) -> ::libc::c_uint;
366
367 pub fn LLVMHalfTypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
369 pub fn LLVMBFloatTypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
370 pub fn LLVMFloatTypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
371 pub fn LLVMDoubleTypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
372 pub fn LLVMX86FP80TypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
373 pub fn LLVMFP128TypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
374 pub fn LLVMPPCFP128TypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
375 pub fn LLVMHalfType() -> LLVMTypeRef;
376 pub fn LLVMBFloatType() -> LLVMTypeRef;
377 pub fn LLVMFloatType() -> LLVMTypeRef;
378 pub fn LLVMDoubleType() -> LLVMTypeRef;
379 pub fn LLVMX86FP80Type() -> LLVMTypeRef;
380 pub fn LLVMFP128Type() -> LLVMTypeRef;
381 pub fn LLVMPPCFP128Type() -> LLVMTypeRef;
382
383 pub fn LLVMFunctionType(
385 ReturnType: LLVMTypeRef,
386 ParamTypes: *mut LLVMTypeRef,
387 ParamCount: ::libc::c_uint,
388 IsVarArg: LLVMBool,
389 ) -> LLVMTypeRef;
390 pub fn LLVMIsFunctionVarArg(FunctionTy: LLVMTypeRef) -> LLVMBool;
391 pub fn LLVMGetReturnType(FunctionTy: LLVMTypeRef) -> LLVMTypeRef;
392 pub fn LLVMCountParamTypes(FunctionTy: LLVMTypeRef) -> ::libc::c_uint;
393 pub fn LLVMGetParamTypes(FunctionTy: LLVMTypeRef, Dest: *mut LLVMTypeRef);
394
395 pub fn LLVMStructTypeInContext(
397 C: LLVMContextRef,
398 ElementTypes: *mut LLVMTypeRef,
399 ElementCount: ::libc::c_uint,
400 Packed: LLVMBool,
401 ) -> LLVMTypeRef;
402 pub fn LLVMStructType(
403 ElementTypes: *mut LLVMTypeRef,
404 ElementCount: ::libc::c_uint,
405 Packed: LLVMBool,
406 ) -> LLVMTypeRef;
407 pub fn LLVMStructCreateNamed(C: LLVMContextRef, Name: *const ::libc::c_char) -> LLVMTypeRef;
408 pub fn LLVMGetStructName(Ty: LLVMTypeRef) -> *const ::libc::c_char;
409 pub fn LLVMStructSetBody(
410 StructTy: LLVMTypeRef,
411 ElementTypes: *mut LLVMTypeRef,
412 ElementCount: ::libc::c_uint,
413 Packed: LLVMBool,
414 );
415 pub fn LLVMCountStructElementTypes(StructTy: LLVMTypeRef) -> ::libc::c_uint;
416 pub fn LLVMGetStructElementTypes(StructTy: LLVMTypeRef, Dest: *mut LLVMTypeRef);
417 pub fn LLVMStructGetTypeAtIndex(StructTy: LLVMTypeRef, i: ::libc::c_uint) -> LLVMTypeRef;
421 pub fn LLVMIsPackedStruct(StructTy: LLVMTypeRef) -> LLVMBool;
423 pub fn LLVMIsOpaqueStruct(StructTy: LLVMTypeRef) -> LLVMBool;
424 pub fn LLVMIsLiteralStruct(StructTy: LLVMTypeRef) -> LLVMBool;
425
426 pub fn LLVMGetElementType(Ty: LLVMTypeRef) -> LLVMTypeRef;
428 pub fn LLVMGetSubtypes(Tp: LLVMTypeRef, Arr: *mut LLVMTypeRef);
430 pub fn LLVMGetNumContainedTypes(Tp: LLVMTypeRef) -> ::libc::c_uint;
432 #[deprecated(
433 since = "17.0",
434 note = "LLVMArrayType is deprecated in favor of the API accurate LLVMArrayType2"
435 )]
436 pub fn LLVMArrayType(ElementType: LLVMTypeRef, ElementCount: ::libc::c_uint) -> LLVMTypeRef;
437 pub fn LLVMArrayType2(ElementType: LLVMTypeRef, ElementCount: u64) -> LLVMTypeRef;
442 #[deprecated(
443 since = "17.0",
444 note = "LLVMGetArrayLength is deprecated in favor of the API accurate LLVMGetArrayLength2"
445 )]
446 pub fn LLVMGetArrayLength(ArrayTy: LLVMTypeRef) -> ::libc::c_uint;
447 pub fn LLVMGetArrayLength2(ArrayTy: LLVMTypeRef) -> u64;
451 pub fn LLVMPointerType(ElementType: LLVMTypeRef, AddressSpace: ::libc::c_uint) -> LLVMTypeRef;
452 pub fn LLVMPointerTypeIsOpaque(Ty: LLVMTypeRef) -> LLVMBool;
456 pub fn LLVMPointerTypeInContext(C: LLVMContextRef, AddressSpace: ::libc::c_uint)
458 -> LLVMTypeRef;
459 pub fn LLVMGetPointerAddressSpace(PointerTy: LLVMTypeRef) -> ::libc::c_uint;
460 pub fn LLVMVectorType(ElementType: LLVMTypeRef, ElementCount: ::libc::c_uint) -> LLVMTypeRef;
461 pub fn LLVMScalableVectorType(
467 ElementType: LLVMTypeRef,
468 ElementCount: ::libc::c_uint,
469 ) -> LLVMTypeRef;
470 pub fn LLVMGetVectorSize(VectorTy: LLVMTypeRef) -> ::libc::c_uint;
472
473 pub fn LLVMGetConstantPtrAuthPointer(PtrAuth: LLVMValueRef) -> LLVMValueRef;
475
476 pub fn LLVMGetConstantPtrAuthKey(PtrAuth: LLVMValueRef) -> LLVMValueRef;
478
479 pub fn LLVMGetConstantPtrAuthDiscriminator(PtrAuth: LLVMValueRef) -> LLVMValueRef;
481
482 pub fn LLVMGetConstantPtrAuthAddrDiscriminator(PtrAuth: LLVMValueRef) -> LLVMValueRef;
485
486 pub fn LLVMVoidTypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
488 pub fn LLVMLabelTypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
489 pub fn LLVMX86MMXTypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
490 pub fn LLVMX86AMXTypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
491 pub fn LLVMTokenTypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
492 pub fn LLVMMetadataTypeInContext(C: LLVMContextRef) -> LLVMTypeRef;
493 pub fn LLVMVoidType() -> LLVMTypeRef;
494 pub fn LLVMLabelType() -> LLVMTypeRef;
495 pub fn LLVMX86MMXType() -> LLVMTypeRef;
496 pub fn LLVMX86AMXType() -> LLVMTypeRef;
497 pub fn LLVMTargetExtTypeInContext(
498 C: LLVMContextRef,
499 Name: *const ::libc::c_char,
500 TypeParams: *mut LLVMTypeRef,
501 TypeParamCount: ::libc::c_uint,
502 IntParams: *mut ::libc::c_uint,
503 IntParamCount: ::libc::c_uint,
504 ) -> LLVMTypeRef;
505
506 pub fn LLVMGetTargetExtTypeName(TargetExtTy: LLVMTypeRef) -> *const ::libc::c_char;
508
509 pub fn LLVMGetTargetExtTypeNumTypeParams(TargetExtTy: LLVMTypeRef) -> ::libc::c_uint;
511
512 pub fn LLVMGetTargetExtTypeTypeParam(
514 TargetExtTy: LLVMTypeRef,
515 Idx: ::libc::c_uint,
516 ) -> LLVMTypeRef;
517
518 pub fn LLVMGetTargetExtTypeNumIntParams(TargetExtTy: LLVMTypeRef) -> ::libc::c_uint;
520
521 pub fn LLVMGetTargetExtTypeIntParam(
523 TargetExtTy: LLVMTypeRef,
524 Idx: ::libc::c_uint,
525 ) -> ::libc::c_uint;
526}
527
528extern "C" {
530 pub fn LLVMGetValueKind(Val: LLVMValueRef) -> LLVMValueKind;
533 pub fn LLVMTypeOf(Val: LLVMValueRef) -> LLVMTypeRef;
534
535 #[deprecated(since = "7.0", note = "Use LLVMGetValueName2 instead")]
536 pub fn LLVMGetValueName(Val: LLVMValueRef) -> *const ::libc::c_char;
537 pub fn LLVMGetValueName2(
538 Val: LLVMValueRef,
539 Length: *mut ::libc::size_t,
540 ) -> *const ::libc::c_char;
541 #[deprecated(since = "7.0", note = "Use LLVMSetValueName2 instead")]
542 pub fn LLVMSetValueName(Val: LLVMValueRef, Name: *const ::libc::c_char);
543 pub fn LLVMSetValueName2(
544 Val: LLVMValueRef,
545 Name: *const ::libc::c_char,
546 NameLen: ::libc::size_t,
547 );
548
549 pub fn LLVMDumpValue(Val: LLVMValueRef);
550 pub fn LLVMPrintValueToString(Val: LLVMValueRef) -> *mut ::libc::c_char;
551 pub fn LLVMPrintDbgRecordToString(Record: LLVMDbgRecordRef) -> *mut ::libc::c_char;
555 pub fn LLVMReplaceAllUsesWith(OldVal: LLVMValueRef, NewVal: LLVMValueRef);
556 pub fn LLVMIsConstant(Val: LLVMValueRef) -> LLVMBool;
558 pub fn LLVMIsUndef(Val: LLVMValueRef) -> LLVMBool;
559 pub fn LLVMIsPoison(Val: LLVMValueRef) -> LLVMBool;
561 pub fn LLVMIsAMDNode(Val: LLVMValueRef) -> LLVMValueRef;
562 pub fn LLVMIsAValueAsMetadata(Val: LLVMValueRef) -> LLVMValueRef;
563 pub fn LLVMIsAMDString(Val: LLVMValueRef) -> LLVMValueRef;
564
565 pub fn LLVMGetFirstUse(Val: LLVMValueRef) -> LLVMUseRef;
567 pub fn LLVMGetNextUse(U: LLVMUseRef) -> LLVMUseRef;
568 pub fn LLVMGetUser(U: LLVMUseRef) -> LLVMValueRef;
569 pub fn LLVMGetUsedValue(U: LLVMUseRef) -> LLVMValueRef;
570
571 pub fn LLVMGetOperand(Val: LLVMValueRef, Index: ::libc::c_uint) -> LLVMValueRef;
573 pub fn LLVMGetOperandUse(Val: LLVMValueRef, Index: ::libc::c_uint) -> LLVMUseRef;
574 pub fn LLVMSetOperand(User: LLVMValueRef, Index: ::libc::c_uint, Val: LLVMValueRef);
575 pub fn LLVMGetNumOperands(Val: LLVMValueRef) -> ::libc::c_int;
576
577 pub fn LLVMConstNull(Ty: LLVMTypeRef) -> LLVMValueRef;
579 pub fn LLVMConstAllOnes(Ty: LLVMTypeRef) -> LLVMValueRef;
580 pub fn LLVMGetUndef(Ty: LLVMTypeRef) -> LLVMValueRef;
581 pub fn LLVMGetPoison(Ty: LLVMTypeRef) -> LLVMValueRef;
583 pub fn LLVMIsNull(Val: LLVMValueRef) -> LLVMBool;
584 pub fn LLVMConstPointerNull(Ty: LLVMTypeRef) -> LLVMValueRef;
585
586 pub fn LLVMConstInt(
588 IntTy: LLVMTypeRef,
589 N: ::libc::c_ulonglong,
590 SignExtend: LLVMBool,
591 ) -> LLVMValueRef;
592 pub fn LLVMConstIntOfArbitraryPrecision(
593 IntTy: LLVMTypeRef,
594 NumWords: ::libc::c_uint,
595 Words: *const u64,
596 ) -> LLVMValueRef;
597 pub fn LLVMConstIntOfString(
598 IntTy: LLVMTypeRef,
599 Text: *const ::libc::c_char,
600 Radix: u8,
601 ) -> LLVMValueRef;
602 pub fn LLVMConstIntOfStringAndSize(
603 IntTy: LLVMTypeRef,
604 Text: *const ::libc::c_char,
605 SLen: ::libc::c_uint,
606 Radix: u8,
607 ) -> LLVMValueRef;
608 pub fn LLVMConstReal(RealTy: LLVMTypeRef, N: ::libc::c_double) -> LLVMValueRef;
609 pub fn LLVMConstRealOfString(RealTy: LLVMTypeRef, Text: *const ::libc::c_char) -> LLVMValueRef;
610 pub fn LLVMConstRealOfStringAndSize(
611 RealTy: LLVMTypeRef,
612 Text: *const ::libc::c_char,
613 SLen: ::libc::c_uint,
614 ) -> LLVMValueRef;
615 pub fn LLVMConstIntGetZExtValue(ConstantVal: LLVMValueRef) -> ::libc::c_ulonglong;
616 pub fn LLVMConstIntGetSExtValue(ConstantVal: LLVMValueRef) -> ::libc::c_longlong;
617 pub fn LLVMConstRealGetDouble(
618 ConstantVal: LLVMValueRef,
619 losesInfo: *mut LLVMBool,
620 ) -> ::libc::c_double;
621
622 #[deprecated(since = "19.1", note = "Use LLVMConstStringInContext2 instead.")]
624 pub fn LLVMConstStringInContext(
625 C: LLVMContextRef,
626 Str: *const ::libc::c_char,
627 Length: ::libc::c_uint,
628 DontNullTerminate: LLVMBool,
629 ) -> LLVMValueRef;
630 pub fn LLVMConstStringInContext2(
631 C: LLVMContextRef,
632 Str: *const ::libc::c_char,
633 Length: usize,
634 DontNullTerminate: LLVMBool,
635 ) -> LLVMValueRef;
636 pub fn LLVMConstString(
637 Str: *const ::libc::c_char,
638 Length: ::libc::c_uint,
639 DontNullTerminate: LLVMBool,
640 ) -> LLVMValueRef;
641 pub fn LLVMIsConstantString(c: LLVMValueRef) -> LLVMBool;
642 pub fn LLVMGetAsString(C: LLVMValueRef, Length: *mut ::libc::size_t) -> *const ::libc::c_char;
643 pub fn LLVMConstStructInContext(
644 C: LLVMContextRef,
645 ConstantVals: *mut LLVMValueRef,
646 Count: ::libc::c_uint,
647 Packed: LLVMBool,
648 ) -> LLVMValueRef;
649 pub fn LLVMConstStruct(
650 ConstantVals: *mut LLVMValueRef,
651 Count: ::libc::c_uint,
652 Packed: LLVMBool,
653 ) -> LLVMValueRef;
654 #[deprecated(
655 since = "17.0",
656 note = "LLVMConstArray is deprecated in favor of the API accurate LLVMConstArray2"
657 )]
658 pub fn LLVMConstArray(
659 ElementTy: LLVMTypeRef,
660 ConstantVals: *mut LLVMValueRef,
661 Length: ::libc::c_uint,
662 ) -> LLVMValueRef;
663 pub fn LLVMConstArray2(
665 ElementTy: LLVMTypeRef,
666 ConstantVals: *mut LLVMValueRef,
667 Length: u64,
668 ) -> LLVMValueRef;
669 pub fn LLVMConstNamedStruct(
670 StructTy: LLVMTypeRef,
671 ConstantVals: *mut LLVMValueRef,
672 Count: ::libc::c_uint,
673 ) -> LLVMValueRef;
674 pub fn LLVMGetAggregateElement(C: LLVMValueRef, idx: ::libc::c_uint) -> LLVMValueRef;
675 #[deprecated(since = "15.0", note = "Use LLVMGetAggregateElement instead")]
676 pub fn LLVMGetElementAsConstant(C: LLVMValueRef, idx: ::libc::c_uint) -> LLVMValueRef;
677 pub fn LLVMConstVector(
678 ScalarConstantVals: *mut LLVMValueRef,
679 Size: ::libc::c_uint,
680 ) -> LLVMValueRef;
681 pub fn LLVMConstantPtrAuth(
683 Ptr: LLVMValueRef,
684 Key: LLVMValueRef,
685 Disc: LLVMValueRef,
686 AddrDisc: LLVMValueRef,
687 ) -> LLVMValueRef;
688
689 pub fn LLVMGetConstOpcode(ConstantVal: LLVMValueRef) -> LLVMOpcode;
691 pub fn LLVMAlignOf(Ty: LLVMTypeRef) -> LLVMValueRef;
692 pub fn LLVMSizeOf(Ty: LLVMTypeRef) -> LLVMValueRef;
693 pub fn LLVMConstNeg(ConstantVal: LLVMValueRef) -> LLVMValueRef;
694 pub fn LLVMConstNSWNeg(ConstantVal: LLVMValueRef) -> LLVMValueRef;
695 #[deprecated(since = "19.1", note = "Use LLVMConstNull instead.")]
696 pub fn LLVMConstNUWNeg(ConstantVal: LLVMValueRef) -> LLVMValueRef;
697 pub fn LLVMConstNot(ConstantVal: LLVMValueRef) -> LLVMValueRef;
698 pub fn LLVMConstAdd(LHSConstant: LLVMValueRef, RHSConstant: LLVMValueRef) -> LLVMValueRef;
699 pub fn LLVMConstNSWAdd(LHSConstant: LLVMValueRef, RHSConstant: LLVMValueRef) -> LLVMValueRef;
700 pub fn LLVMConstNUWAdd(LHSConstant: LLVMValueRef, RHSConstant: LLVMValueRef) -> LLVMValueRef;
701 pub fn LLVMConstSub(LHSConstant: LLVMValueRef, RHSConstant: LLVMValueRef) -> LLVMValueRef;
702 pub fn LLVMConstNSWSub(LHSConstant: LLVMValueRef, RHSConstant: LLVMValueRef) -> LLVMValueRef;
703 pub fn LLVMConstNUWSub(LHSConstant: LLVMValueRef, RHSConstant: LLVMValueRef) -> LLVMValueRef;
704 pub fn LLVMConstMul(LHSConstant: LLVMValueRef, RHSConstant: LLVMValueRef) -> LLVMValueRef;
705 pub fn LLVMConstNSWMul(LHSConstant: LLVMValueRef, RHSConstant: LLVMValueRef) -> LLVMValueRef;
706 pub fn LLVMConstNUWMul(LHSConstant: LLVMValueRef, RHSConstant: LLVMValueRef) -> LLVMValueRef;
707 pub fn LLVMConstXor(LHSConstant: LLVMValueRef, RHSConstant: LLVMValueRef) -> LLVMValueRef;
708 pub fn LLVMConstGEP2(
709 Ty: LLVMTypeRef,
710 ConstantVal: LLVMValueRef,
711 ConstantIndices: *mut LLVMValueRef,
712 NumIndices: ::libc::c_uint,
713 ) -> LLVMValueRef;
714 pub fn LLVMConstInBoundsGEP2(
715 Ty: LLVMTypeRef,
716 ConstantVal: LLVMValueRef,
717 ConstantIndices: *mut LLVMValueRef,
718 NumIndices: ::libc::c_uint,
719 ) -> LLVMValueRef;
720 pub fn LLVMConstGEPWithNoWrapFlags(
724 Ty: LLVMTypeRef,
725 ConstantVal: LLVMValueRef,
726 ConstantIndices: *mut LLVMValueRef,
727 NumIndices: ::libc::c_uint,
728 NoWrapFlags: LLVMGEPNoWrapFlags,
729 ) -> LLVMValueRef;
730 pub fn LLVMConstTrunc(ConstantVal: LLVMValueRef, ToType: LLVMTypeRef) -> LLVMValueRef;
731 pub fn LLVMConstPtrToInt(ConstantVal: LLVMValueRef, ToType: LLVMTypeRef) -> LLVMValueRef;
732 pub fn LLVMConstIntToPtr(ConstantVal: LLVMValueRef, ToType: LLVMTypeRef) -> LLVMValueRef;
733 pub fn LLVMConstBitCast(ConstantVal: LLVMValueRef, ToType: LLVMTypeRef) -> LLVMValueRef;
734 pub fn LLVMConstAddrSpaceCast(ConstantVal: LLVMValueRef, ToType: LLVMTypeRef) -> LLVMValueRef;
735 pub fn LLVMConstTruncOrBitCast(ConstantVal: LLVMValueRef, ToType: LLVMTypeRef) -> LLVMValueRef;
736 pub fn LLVMConstPointerCast(ConstantVal: LLVMValueRef, ToType: LLVMTypeRef) -> LLVMValueRef;
737 pub fn LLVMConstExtractElement(
738 VectorConstant: LLVMValueRef,
739 IndexConstant: LLVMValueRef,
740 ) -> LLVMValueRef;
741 pub fn LLVMConstInsertElement(
742 VectorConstant: LLVMValueRef,
743 ElementValueConstant: LLVMValueRef,
744 IndexConstant: LLVMValueRef,
745 ) -> LLVMValueRef;
746 pub fn LLVMConstShuffleVector(
747 VectorAConstant: LLVMValueRef,
748 VectorBConstant: LLVMValueRef,
749 MaskConstant: LLVMValueRef,
750 ) -> LLVMValueRef;
751 #[deprecated(since = "7.0", note = "Use LLVMGetInlineAsm instead")]
752 pub fn LLVMConstInlineAsm(
753 Ty: LLVMTypeRef,
754 AsmString: *const ::libc::c_char,
755 Constraints: *const ::libc::c_char,
756 HasSideEffects: LLVMBool,
757 IsAlignStack: LLVMBool,
758 ) -> LLVMValueRef;
759 pub fn LLVMBlockAddress(F: LLVMValueRef, BB: LLVMBasicBlockRef) -> LLVMValueRef;
760 pub fn LLVMGetBlockAddressFunction(BlockAddr: LLVMValueRef) -> LLVMValueRef;
762 pub fn LLVMGetBlockAddressBasicBlock(BlockAddr: LLVMValueRef) -> LLVMBasicBlockRef;
764
765 pub fn LLVMGetGlobalParent(Global: LLVMValueRef) -> LLVMModuleRef;
767 pub fn LLVMIsDeclaration(Global: LLVMValueRef) -> LLVMBool;
768 pub fn LLVMGetLinkage(Global: LLVMValueRef) -> LLVMLinkage;
769 pub fn LLVMSetLinkage(Global: LLVMValueRef, Linkage: LLVMLinkage);
770 pub fn LLVMGetSection(Global: LLVMValueRef) -> *const ::libc::c_char;
771 pub fn LLVMSetSection(Global: LLVMValueRef, Section: *const ::libc::c_char);
772 pub fn LLVMGetVisibility(Global: LLVMValueRef) -> LLVMVisibility;
773 pub fn LLVMSetVisibility(Global: LLVMValueRef, Viz: LLVMVisibility);
774 pub fn LLVMGetDLLStorageClass(Global: LLVMValueRef) -> LLVMDLLStorageClass;
775 pub fn LLVMSetDLLStorageClass(Global: LLVMValueRef, Class: LLVMDLLStorageClass);
776
777 pub fn LLVMGetUnnamedAddress(Global: LLVMValueRef) -> LLVMUnnamedAddr;
778 pub fn LLVMSetUnnamedAddress(Global: LLVMValueRef, UnnamedAddr: LLVMUnnamedAddr);
779 pub fn LLVMGlobalGetValueType(Global: LLVMValueRef) -> LLVMTypeRef;
780 #[deprecated(since = "7.0", note = "Use LLVMGetUnnamedAddress instead")]
781 pub fn LLVMHasUnnamedAddr(Global: LLVMValueRef) -> LLVMBool;
782 #[deprecated(since = "7.0", note = "Use LLVMSetUnnamedAddress instead")]
783 pub fn LLVMSetUnnamedAddr(Global: LLVMValueRef, HasUnnamedAddr: LLVMBool);
784
785 pub fn LLVMGetAlignment(V: LLVMValueRef) -> ::libc::c_uint;
786 pub fn LLVMSetAlignment(V: LLVMValueRef, Bytes: ::libc::c_uint);
787
788 pub fn LLVMGlobalSetMetadata(Global: LLVMValueRef, Kind: ::libc::c_uint, MD: LLVMMetadataRef);
789 pub fn LLVMGlobalEraseMetadata(Global: LLVMValueRef, Kind: ::libc::c_uint);
790 pub fn LLVMGlobalClearMetadata(Global: LLVMValueRef);
791 pub fn LLVMGlobalCopyAllMetadata(
792 Value: LLVMValueRef,
793 NumEntries: *mut ::libc::size_t,
794 ) -> *mut LLVMValueMetadataEntry;
795 pub fn LLVMDisposeValueMetadataEntries(Entries: *mut LLVMValueMetadataEntry);
796 pub fn LLVMValueMetadataEntriesGetKind(
797 Entries: *mut LLVMValueMetadataEntry,
798 Index: ::libc::c_uint,
799 ) -> ::libc::c_uint;
800 pub fn LLVMValueMetadataEntriesGetMetadata(
801 Entries: *mut LLVMValueMetadataEntry,
802 Index: ::libc::c_uint,
803 ) -> LLVMMetadataRef;
804
805 pub fn LLVMAddGlobal(
807 M: LLVMModuleRef,
808 Ty: LLVMTypeRef,
809 Name: *const ::libc::c_char,
810 ) -> LLVMValueRef;
811 pub fn LLVMAddGlobalInAddressSpace(
812 M: LLVMModuleRef,
813 Ty: LLVMTypeRef,
814 Name: *const ::libc::c_char,
815 AddressSpace: ::libc::c_uint,
816 ) -> LLVMValueRef;
817 pub fn LLVMGetNamedGlobal(M: LLVMModuleRef, Name: *const ::libc::c_char) -> LLVMValueRef;
818 pub fn LLVMGetFirstGlobal(M: LLVMModuleRef) -> LLVMValueRef;
819 pub fn LLVMGetLastGlobal(M: LLVMModuleRef) -> LLVMValueRef;
820 pub fn LLVMGetNextGlobal(GlobalVar: LLVMValueRef) -> LLVMValueRef;
821 pub fn LLVMGetPreviousGlobal(GlobalVar: LLVMValueRef) -> LLVMValueRef;
822 pub fn LLVMDeleteGlobal(GlobalVar: LLVMValueRef);
823 pub fn LLVMGetInitializer(GlobalVar: LLVMValueRef) -> LLVMValueRef;
824 pub fn LLVMSetInitializer(GlobalVar: LLVMValueRef, ConstantVal: LLVMValueRef);
825 pub fn LLVMIsThreadLocal(GlobalVar: LLVMValueRef) -> LLVMBool;
826 pub fn LLVMSetThreadLocal(GlobalVar: LLVMValueRef, IsThreadLocal: LLVMBool);
827 pub fn LLVMIsGlobalConstant(GlobalVar: LLVMValueRef) -> LLVMBool;
828 pub fn LLVMSetGlobalConstant(GlobalVar: LLVMValueRef, IsConstant: LLVMBool);
829 pub fn LLVMGetThreadLocalMode(GlobalVar: LLVMValueRef) -> LLVMThreadLocalMode;
830 pub fn LLVMSetThreadLocalMode(GlobalVar: LLVMValueRef, Mode: LLVMThreadLocalMode);
831 pub fn LLVMIsExternallyInitialized(GlobalVar: LLVMValueRef) -> LLVMBool;
832 pub fn LLVMSetExternallyInitialized(GlobalVar: LLVMValueRef, IsExtInit: LLVMBool);
833
834 pub fn LLVMGetNamedGlobalAlias(
839 M: LLVMModuleRef,
840 Name: *const ::libc::c_char,
841 NameLen: ::libc::size_t,
842 ) -> LLVMValueRef;
843 pub fn LLVMGetFirstGlobalAlias(M: LLVMModuleRef) -> LLVMValueRef;
845 pub fn LLVMGetLastGlobalAlias(M: LLVMModuleRef) -> LLVMValueRef;
847 pub fn LLVMGetNextGlobalAlias(GA: LLVMValueRef) -> LLVMValueRef;
851 pub fn LLVMGetPreviousGlobalAlias(GA: LLVMValueRef) -> LLVMValueRef;
855 pub fn LLVMAliasGetAliasee(Alias: LLVMValueRef) -> LLVMValueRef;
857 pub fn LLVMAliasSetAliasee(Alias: LLVMValueRef, Aliasee: LLVMValueRef);
859
860 pub fn LLVMAddAlias2(
861 M: LLVMModuleRef,
862 ValueTy: LLVMTypeRef,
863 AddrSpace: ::libc::c_uint,
864 Aliasee: LLVMValueRef,
865 Name: *const ::libc::c_char,
866 ) -> LLVMValueRef;
867
868 pub fn LLVMDeleteFunction(Fn: LLVMValueRef);
870 pub fn LLVMHasPersonalityFn(Fn: LLVMValueRef) -> LLVMBool;
872 pub fn LLVMGetPersonalityFn(Fn: LLVMValueRef) -> LLVMValueRef;
876 pub fn LLVMSetPersonalityFn(Fn: LLVMValueRef, PersonalityFn: LLVMValueRef);
880 pub fn LLVMLookupIntrinsicID(
882 Name: *const ::libc::c_char,
883 NameLen: ::libc::size_t,
884 ) -> ::libc::c_uint;
885 pub fn LLVMGetIntrinsicID(Fn: LLVMValueRef) -> ::libc::c_uint;
887 pub fn LLVMGetIntrinsicDeclaration(
888 Mod: LLVMModuleRef,
889 ID: ::libc::c_uint,
890 ParamTypes: *mut LLVMTypeRef,
891 ParamCount: ::libc::size_t,
892 ) -> LLVMValueRef;
893 pub fn LLVMIntrinsicGetType(
894 Ctx: LLVMContextRef,
895 ID: ::libc::c_uint,
896 ParamTypes: *mut LLVMTypeRef,
897 ParamCount: ::libc::size_t,
898 ) -> LLVMTypeRef;
899 pub fn LLVMIntrinsicGetName(
900 ID: ::libc::c_uint,
901 NameLength: *mut ::libc::size_t,
902 ) -> *const ::libc::c_char;
903 #[deprecated = "Use LLVMIntrinsicCopyOverloadedName2 instead."]
904 pub fn LLVMIntrinsicCopyOverloadedName(
905 ID: ::libc::c_uint,
906 ParamTypes: *mut LLVMTypeRef,
907 ParamCount: ::libc::size_t,
908 NameLength: *mut ::libc::size_t,
909 ) -> *const ::libc::c_char;
910 pub fn LLVMIntrinsicCopyOverloadedName2(
911 Mod: LLVMModuleRef,
912 ID: ::libc::c_uint,
913 ParamTypes: *mut LLVMTypeRef,
914 ParamCount: ::libc::size_t,
915 NameLength: *mut ::libc::size_t,
916 ) -> *const ::libc::c_char;
917 pub fn LLVMIntrinsicIsOverloaded(ID: ::libc::c_uint) -> LLVMBool;
918 pub fn LLVMGetFunctionCallConv(Fn: LLVMValueRef) -> ::libc::c_uint;
919 pub fn LLVMSetFunctionCallConv(Fn: LLVMValueRef, CC: ::libc::c_uint);
920 pub fn LLVMGetGC(Fn: LLVMValueRef) -> *const ::libc::c_char;
921 pub fn LLVMSetGC(Fn: LLVMValueRef, Name: *const ::libc::c_char);
922
923 pub fn LLVMGetPrefixData(Fn: LLVMValueRef) -> LLVMValueRef;
927
928 pub fn LLVMHasPrefixData(Fn: LLVMValueRef) -> LLVMBool;
930
931 pub fn LLVMSetPrefixData(Fn: LLVMValueRef, prefixData: LLVMValueRef);
933
934 pub fn LLVMGetPrologueData(Fn: LLVMValueRef) -> LLVMValueRef;
938
939 pub fn LLVMHasPrologueData(Fn: LLVMValueRef) -> LLVMBool;
941
942 pub fn LLVMSetPrologueData(Fn: LLVMValueRef, prologueData: LLVMValueRef);
944
945 pub fn LLVMAddAttributeAtIndex(F: LLVMValueRef, Idx: LLVMAttributeIndex, A: LLVMAttributeRef);
946 pub fn LLVMGetAttributeCountAtIndex(F: LLVMValueRef, Idx: LLVMAttributeIndex)
947 -> ::libc::c_uint;
948 pub fn LLVMGetAttributesAtIndex(
949 F: LLVMValueRef,
950 Idx: LLVMAttributeIndex,
951 Attrs: *mut LLVMAttributeRef,
952 );
953 pub fn LLVMGetEnumAttributeAtIndex(
954 F: LLVMValueRef,
955 Idx: LLVMAttributeIndex,
956 KindID: ::libc::c_uint,
957 ) -> LLVMAttributeRef;
958 pub fn LLVMGetStringAttributeAtIndex(
959 F: LLVMValueRef,
960 Idx: LLVMAttributeIndex,
961 K: *const ::libc::c_char,
962 KLen: ::libc::c_uint,
963 ) -> LLVMAttributeRef;
964 pub fn LLVMRemoveEnumAttributeAtIndex(
965 F: LLVMValueRef,
966 Idx: LLVMAttributeIndex,
967 KindID: ::libc::c_uint,
968 );
969 pub fn LLVMRemoveStringAttributeAtIndex(
970 F: LLVMValueRef,
971 Idx: LLVMAttributeIndex,
972 K: *const ::libc::c_char,
973 KLen: ::libc::c_uint,
974 );
975 pub fn LLVMAddTargetDependentFunctionAttr(
976 Fn: LLVMValueRef,
977 A: *const ::libc::c_char,
978 V: *const ::libc::c_char,
979 );
980
981 pub fn LLVMCountParams(Fn: LLVMValueRef) -> ::libc::c_uint;
983 pub fn LLVMGetParams(Fn: LLVMValueRef, Params: *mut LLVMValueRef);
984 pub fn LLVMGetParam(Fn: LLVMValueRef, Index: ::libc::c_uint) -> LLVMValueRef;
985 pub fn LLVMGetParamParent(Inst: LLVMValueRef) -> LLVMValueRef;
986 pub fn LLVMGetFirstParam(Fn: LLVMValueRef) -> LLVMValueRef;
987 pub fn LLVMGetLastParam(Fn: LLVMValueRef) -> LLVMValueRef;
988 pub fn LLVMGetNextParam(Arg: LLVMValueRef) -> LLVMValueRef;
989 pub fn LLVMGetPreviousParam(Arg: LLVMValueRef) -> LLVMValueRef;
990 pub fn LLVMSetParamAlignment(Arg: LLVMValueRef, Align: ::libc::c_uint);
991}
992
993extern "C" {
995 #[deprecated(since = "LLVM 9.0", note = "Use LLVMMDStringInContext2 instead.")]
996 pub fn LLVMMDStringInContext(
997 C: LLVMContextRef,
998 Str: *const ::libc::c_char,
999 SLen: ::libc::c_uint,
1000 ) -> LLVMValueRef;
1001 #[deprecated(since = "LLVM 9.0", note = "Use LLVMMDStringInContext2 instead.")]
1002 pub fn LLVMMDString(Str: *const ::libc::c_char, SLen: ::libc::c_uint) -> LLVMValueRef;
1003 #[deprecated(since = "LLVM 9.0", note = "Use LLVMMDNodeInContext2 instead.")]
1004 pub fn LLVMMDNodeInContext(
1005 C: LLVMContextRef,
1006 Vals: *mut LLVMValueRef,
1007 Count: ::libc::c_uint,
1008 ) -> LLVMValueRef;
1009 #[deprecated(since = "LLVM 9.0", note = "Use LLVMMDNodeInContext2 instead.")]
1010 pub fn LLVMMDNode(Vals: *mut LLVMValueRef, Count: ::libc::c_uint) -> LLVMValueRef;
1011
1012 pub fn LLVMCreateOperandBundle(
1017 Tag: *const ::libc::c_char,
1018 TagLen: ::libc::size_t,
1019 Args: *mut LLVMValueRef,
1020 NumArgs: ::libc::c_uint,
1021 ) -> LLVMOperandBundleRef;
1022
1023 pub fn LLVMDisposeOperandBundle(Bundle: LLVMOperandBundleRef);
1028
1029 pub fn LLVMGetOperandBundleTag(
1036 Bundle: LLVMOperandBundleRef,
1037 Len: *mut ::libc::size_t,
1038 ) -> *const ::libc::c_char;
1039
1040 pub fn LLVMGetNumOperandBundleArgs(Bundle: LLVMOperandBundleRef) -> ::libc::c_uint;
1042
1043 pub fn LLVMGetOperandBundleArgAtIndex(
1045 Bundle: LLVMOperandBundleRef,
1046 Index: ::libc::c_uint,
1047 ) -> LLVMValueRef;
1048
1049 pub fn LLVMAddGlobalIFunc(
1051 M: LLVMModuleRef,
1052 Name: *const ::libc::c_char,
1053 NameLen: ::libc::size_t,
1054 Ty: LLVMTypeRef,
1055 AddrSpace: ::libc::c_uint,
1056 Resolver: LLVMValueRef,
1057 ) -> LLVMValueRef;
1058
1059 pub fn LLVMGetNamedGlobalIFunc(
1061 M: LLVMModuleRef,
1062 Name: *const ::libc::c_char,
1063 NameLen: ::libc::size_t,
1064 ) -> LLVMValueRef;
1065
1066 pub fn LLVMGetFirstGlobalIFunc(M: LLVMModuleRef) -> LLVMValueRef;
1068
1069 pub fn LLVMGetLastGlobalIFunc(M: LLVMModuleRef) -> LLVMValueRef;
1071
1072 pub fn LLVMGetNextGlobalIFunc(IFunc: LLVMValueRef) -> LLVMValueRef;
1074
1075 pub fn LLVMGetPreviousGlobalIFunc(IFunc: LLVMValueRef) -> LLVMValueRef;
1077
1078 pub fn LLVMGetGlobalIFuncResolver(IFunc: LLVMValueRef) -> LLVMValueRef;
1081
1082 pub fn LLVMSetGlobalIFuncResolver(IFunc: LLVMValueRef, Resolver: LLVMValueRef);
1084
1085 pub fn LLVMEraseGlobalIFunc(IFunc: LLVMValueRef);
1087
1088 pub fn LLVMRemoveGlobalIFunc(IFunc: LLVMValueRef);
1090
1091 pub fn LLVMMDStringInContext2(
1093 C: LLVMContextRef,
1094 Str: *const ::libc::c_char,
1095 SLen: ::libc::size_t,
1096 ) -> LLVMMetadataRef;
1097
1098 pub fn LLVMMDNodeInContext2(
1100 C: LLVMContextRef,
1101 MDs: *mut LLVMMetadataRef,
1102 Count: ::libc::size_t,
1103 ) -> LLVMMetadataRef;
1104
1105 pub fn LLVMMetadataAsValue(C: LLVMContextRef, MD: LLVMMetadataRef) -> LLVMValueRef;
1107 pub fn LLVMValueAsMetadata(Val: LLVMValueRef) -> LLVMMetadataRef;
1109 pub fn LLVMGetMDString(V: LLVMValueRef, Len: *mut ::libc::c_uint) -> *const ::libc::c_char;
1113 pub fn LLVMGetMDNodeNumOperands(V: LLVMValueRef) -> ::libc::c_uint;
1114 pub fn LLVMGetMDNodeOperands(V: LLVMValueRef, Dest: *mut LLVMValueRef);
1115 pub fn LLVMReplaceMDNodeOperandWith(
1117 V: LLVMValueRef,
1118 Index: ::libc::c_uint,
1119 Replacement: LLVMMetadataRef,
1120 );
1121}
1122
1123extern "C" {
1125 pub fn LLVMBasicBlockAsValue(BB: LLVMBasicBlockRef) -> LLVMValueRef;
1126 pub fn LLVMValueIsBasicBlock(Val: LLVMValueRef) -> LLVMBool;
1127 pub fn LLVMValueAsBasicBlock(Val: LLVMValueRef) -> LLVMBasicBlockRef;
1128 pub fn LLVMGetBasicBlockName(BB: LLVMBasicBlockRef) -> *const ::libc::c_char;
1130 pub fn LLVMGetBasicBlockParent(BB: LLVMBasicBlockRef) -> LLVMValueRef;
1131 pub fn LLVMGetBasicBlockTerminator(BB: LLVMBasicBlockRef) -> LLVMValueRef;
1132 pub fn LLVMCountBasicBlocks(Fn: LLVMValueRef) -> ::libc::c_uint;
1133 pub fn LLVMGetBasicBlocks(Fn: LLVMValueRef, BasicBlocks: *mut LLVMBasicBlockRef);
1134 pub fn LLVMGetFirstBasicBlock(Fn: LLVMValueRef) -> LLVMBasicBlockRef;
1135 pub fn LLVMGetLastBasicBlock(Fn: LLVMValueRef) -> LLVMBasicBlockRef;
1136 pub fn LLVMGetNextBasicBlock(BB: LLVMBasicBlockRef) -> LLVMBasicBlockRef;
1137 pub fn LLVMGetPreviousBasicBlock(BB: LLVMBasicBlockRef) -> LLVMBasicBlockRef;
1138 pub fn LLVMGetEntryBasicBlock(Fn: LLVMValueRef) -> LLVMBasicBlockRef;
1139 pub fn LLVMInsertExistingBasicBlockAfterInsertBlock(
1141 Builder: LLVMBuilderRef,
1142 BB: LLVMBasicBlockRef,
1143 );
1144 pub fn LLVMAppendExistingBasicBlock(Fn: LLVMValueRef, BB: LLVMBasicBlockRef);
1146 pub fn LLVMCreateBasicBlockInContext(
1147 C: LLVMContextRef,
1148 Name: *const ::libc::c_char,
1149 ) -> LLVMBasicBlockRef;
1150 pub fn LLVMAppendBasicBlockInContext(
1151 C: LLVMContextRef,
1152 Fn: LLVMValueRef,
1153 Name: *const ::libc::c_char,
1154 ) -> LLVMBasicBlockRef;
1155 pub fn LLVMAppendBasicBlock(Fn: LLVMValueRef, Name: *const ::libc::c_char)
1156 -> LLVMBasicBlockRef;
1157 pub fn LLVMInsertBasicBlockInContext(
1158 C: LLVMContextRef,
1159 BB: LLVMBasicBlockRef,
1160 Name: *const ::libc::c_char,
1161 ) -> LLVMBasicBlockRef;
1162 pub fn LLVMInsertBasicBlock(
1163 InsertBeforeBB: LLVMBasicBlockRef,
1164 Name: *const ::libc::c_char,
1165 ) -> LLVMBasicBlockRef;
1166 pub fn LLVMDeleteBasicBlock(BB: LLVMBasicBlockRef);
1167 pub fn LLVMRemoveBasicBlockFromParent(BB: LLVMBasicBlockRef);
1168 pub fn LLVMMoveBasicBlockBefore(BB: LLVMBasicBlockRef, MovePos: LLVMBasicBlockRef);
1169 pub fn LLVMMoveBasicBlockAfter(BB: LLVMBasicBlockRef, MovePos: LLVMBasicBlockRef);
1170 pub fn LLVMGetFirstInstruction(BB: LLVMBasicBlockRef) -> LLVMValueRef;
1171 pub fn LLVMGetLastInstruction(BB: LLVMBasicBlockRef) -> LLVMValueRef;
1172}
1173
1174extern "C" {
1176 pub fn LLVMHasMetadata(Val: LLVMValueRef) -> ::libc::c_int;
1177 pub fn LLVMGetMetadata(Val: LLVMValueRef, KindID: ::libc::c_uint) -> LLVMValueRef;
1178 pub fn LLVMSetMetadata(Val: LLVMValueRef, KindID: ::libc::c_uint, Node: LLVMValueRef);
1179 pub fn LLVMInstructionGetAllMetadataOtherThanDebugLoc(
1180 Instr: LLVMValueRef,
1181 NumEntries: *mut ::libc::size_t,
1182 ) -> *mut LLVMValueMetadataEntry;
1183 pub fn LLVMGetInstructionParent(Inst: LLVMValueRef) -> LLVMBasicBlockRef;
1184 pub fn LLVMGetNextInstruction(Inst: LLVMValueRef) -> LLVMValueRef;
1185 pub fn LLVMGetPreviousInstruction(Inst: LLVMValueRef) -> LLVMValueRef;
1186 pub fn LLVMInstructionRemoveFromParent(Inst: LLVMValueRef);
1189 pub fn LLVMInstructionEraseFromParent(Inst: LLVMValueRef);
1192 pub fn LLVMDeleteInstruction(Inst: LLVMValueRef);
1195 pub fn LLVMGetInstructionOpcode(Inst: LLVMValueRef) -> LLVMOpcode;
1196 pub fn LLVMGetICmpPredicate(Inst: LLVMValueRef) -> LLVMIntPredicate;
1197 pub fn LLVMGetFCmpPredicate(Inst: LLVMValueRef) -> LLVMRealPredicate;
1198 pub fn LLVMInstructionClone(Inst: LLVMValueRef) -> LLVMValueRef;
1199 pub fn LLVMIsATerminatorInst(Inst: LLVMValueRef) -> LLVMValueRef;
1200
1201 pub fn LLVMGetNumArgOperands(Instr: LLVMValueRef) -> ::libc::c_uint;
1206 pub fn LLVMSetInstructionCallConv(Instr: LLVMValueRef, CC: ::libc::c_uint);
1207 pub fn LLVMGetInstructionCallConv(Instr: LLVMValueRef) -> ::libc::c_uint;
1208 pub fn LLVMSetInstrParamAlignment(
1209 Instr: LLVMValueRef,
1210 Idx: LLVMAttributeIndex,
1211 Align: ::libc::c_uint,
1212 );
1213 pub fn LLVMAddCallSiteAttribute(C: LLVMValueRef, Idx: LLVMAttributeIndex, A: LLVMAttributeRef);
1214 pub fn LLVMGetCallSiteAttributeCount(
1215 C: LLVMValueRef,
1216 Idx: LLVMAttributeIndex,
1217 ) -> ::libc::c_uint;
1218 pub fn LLVMGetCallSiteAttributes(
1219 C: LLVMValueRef,
1220 Idx: LLVMAttributeIndex,
1221 Attrs: *mut LLVMAttributeRef,
1222 );
1223 pub fn LLVMGetCallSiteEnumAttribute(
1224 C: LLVMValueRef,
1225 Idx: LLVMAttributeIndex,
1226 KindID: ::libc::c_uint,
1227 ) -> LLVMAttributeRef;
1228 pub fn LLVMGetCallSiteStringAttribute(
1229 C: LLVMValueRef,
1230 Idx: LLVMAttributeIndex,
1231 K: *const ::libc::c_char,
1232 KLen: ::libc::c_uint,
1233 ) -> LLVMAttributeRef;
1234 pub fn LLVMRemoveCallSiteEnumAttribute(
1235 C: LLVMValueRef,
1236 Idx: LLVMAttributeIndex,
1237 KindID: ::libc::c_uint,
1238 );
1239 pub fn LLVMRemoveCallSiteStringAttribute(
1240 C: LLVMValueRef,
1241 Idx: LLVMAttributeIndex,
1242 K: *const ::libc::c_char,
1243 KLen: ::libc::c_uint,
1244 );
1245 pub fn LLVMGetCalledFunctionType(C: LLVMValueRef) -> LLVMTypeRef;
1246 pub fn LLVMGetCalledValue(Instr: LLVMValueRef) -> LLVMValueRef;
1250 pub fn LLVMGetNumOperandBundles(C: LLVMValueRef) -> ::libc::c_uint;
1254 pub fn LLVMGetOperandBundleAtIndex(
1259 C: LLVMValueRef,
1260 Index: ::libc::c_uint,
1261 ) -> LLVMOperandBundleRef;
1262 pub fn LLVMIsTailCall(CallInst: LLVMValueRef) -> LLVMBool;
1264 pub fn LLVMSetTailCall(CallInst: LLVMValueRef, IsTailCall: LLVMBool);
1265 pub fn LLVMGetTailCallKind(CallInst: LLVMValueRef) -> LLVMTailCallKind;
1266 pub fn LLVMSetTailCallKind(CallInst: LLVMValueRef, kind: LLVMTailCallKind);
1267 pub fn LLVMGetNormalDest(InvokeInst: LLVMValueRef) -> LLVMBasicBlockRef;
1269 pub fn LLVMGetUnwindDest(InvokeInst: LLVMValueRef) -> LLVMBasicBlockRef;
1271 pub fn LLVMSetNormalDest(InvokeInst: LLVMValueRef, B: LLVMBasicBlockRef);
1273 pub fn LLVMSetUnwindDest(InvokeInst: LLVMValueRef, B: LLVMBasicBlockRef);
1275
1276 pub fn LLVMGetCallBrDefaultDest(CallBr: LLVMValueRef) -> LLVMBasicBlockRef;
1278 pub fn LLVMGetCallBrNumIndirectDests(CallBr: LLVMValueRef) -> ::libc::c_uint;
1280 pub fn LLVMGetCallBrIndirectDest(
1282 CallBr: LLVMValueRef,
1283 Idx: ::libc::c_uint,
1284 ) -> LLVMBasicBlockRef;
1285
1286 pub fn LLVMGetNumSuccessors(Term: LLVMValueRef) -> ::libc::c_uint;
1288 pub fn LLVMGetSuccessor(Term: LLVMValueRef, i: ::libc::c_uint) -> LLVMBasicBlockRef;
1289 pub fn LLVMSetSuccessor(Term: LLVMValueRef, i: ::libc::c_uint, block: LLVMBasicBlockRef);
1290 pub fn LLVMIsConditional(Branch: LLVMValueRef) -> LLVMBool;
1291 pub fn LLVMGetCondition(Branch: LLVMValueRef) -> LLVMValueRef;
1292 pub fn LLVMSetCondition(Branch: LLVMValueRef, Cond: LLVMValueRef);
1293 pub fn LLVMGetSwitchDefaultDest(SwitchInstr: LLVMValueRef) -> LLVMBasicBlockRef;
1294
1295 pub fn LLVMGetAllocatedType(Alloca: LLVMValueRef) -> LLVMTypeRef;
1298
1299 pub fn LLVMIsInBounds(GEP: LLVMValueRef) -> LLVMBool;
1302 pub fn LLVMSetIsInBounds(GEP: LLVMValueRef, InBounds: LLVMBool);
1304
1305 pub fn LLVMGetGEPSourceElementType(GEP: LLVMValueRef) -> LLVMTypeRef;
1307 pub fn LLVMGEPGetNoWrapFlags(GEP: LLVMValueRef) -> LLVMGEPNoWrapFlags;
1309 pub fn LLVMGEPSetNoWrapFlags(GEP: LLVMValueRef, NoWrapFlags: LLVMGEPNoWrapFlags);
1311
1312 pub fn LLVMAddIncoming(
1314 PhiNode: LLVMValueRef,
1315 IncomingValues: *mut LLVMValueRef,
1316 IncomingBlocks: *mut LLVMBasicBlockRef,
1317 Count: ::libc::c_uint,
1318 );
1319 pub fn LLVMCountIncoming(PhiNode: LLVMValueRef) -> ::libc::c_uint;
1320 pub fn LLVMGetIncomingValue(PhiNode: LLVMValueRef, Index: ::libc::c_uint) -> LLVMValueRef;
1321 pub fn LLVMGetIncomingBlock(PhiNode: LLVMValueRef, Index: ::libc::c_uint) -> LLVMBasicBlockRef;
1322}
1323
1324extern "C" {
1326 pub fn LLVMIsAArgument(Val: LLVMValueRef) -> LLVMValueRef;
1327 pub fn LLVMIsABasicBlock(Val: LLVMValueRef) -> LLVMValueRef;
1328 pub fn LLVMIsAInlineAsm(Val: LLVMValueRef) -> LLVMValueRef;
1329 pub fn LLVMIsAUser(Val: LLVMValueRef) -> LLVMValueRef;
1330 pub fn LLVMIsAConstant(Val: LLVMValueRef) -> LLVMValueRef;
1331 pub fn LLVMIsABlockAddress(Val: LLVMValueRef) -> LLVMValueRef;
1332 pub fn LLVMIsAConstantAggregateZero(Val: LLVMValueRef) -> LLVMValueRef;
1333 pub fn LLVMIsAConstantArray(Val: LLVMValueRef) -> LLVMValueRef;
1334 pub fn LLVMIsAConstantDataSequential(Val: LLVMValueRef) -> LLVMValueRef;
1335 pub fn LLVMIsAConstantDataArray(Val: LLVMValueRef) -> LLVMValueRef;
1336 pub fn LLVMIsAConstantDataVector(Val: LLVMValueRef) -> LLVMValueRef;
1337 pub fn LLVMIsAConstantExpr(Val: LLVMValueRef) -> LLVMValueRef;
1338 pub fn LLVMIsAConstantFP(Val: LLVMValueRef) -> LLVMValueRef;
1339 pub fn LLVMIsAConstantInt(Val: LLVMValueRef) -> LLVMValueRef;
1340 pub fn LLVMIsAConstantPointerNull(Val: LLVMValueRef) -> LLVMValueRef;
1341 pub fn LLVMIsAConstantStruct(Val: LLVMValueRef) -> LLVMValueRef;
1342 pub fn LLVMIsAConstantTokenNone(Val: LLVMValueRef) -> LLVMValueRef;
1343 pub fn LLVMIsAConstantVector(Val: LLVMValueRef) -> LLVMValueRef;
1344 pub fn LLVMIsAConstantPtrAuth(Val: LLVMValueRef) -> LLVMValueRef;
1345 pub fn LLVMIsAGlobalValue(Val: LLVMValueRef) -> LLVMValueRef;
1346 pub fn LLVMIsAGlobalAlias(Val: LLVMValueRef) -> LLVMValueRef;
1347 pub fn LLVMIsAGlobalIFunc(Val: LLVMValueRef) -> LLVMValueRef;
1348 pub fn LLVMIsAGlobalObject(Val: LLVMValueRef) -> LLVMValueRef;
1349 pub fn LLVMIsAFunction(Val: LLVMValueRef) -> LLVMValueRef;
1350 pub fn LLVMIsAGlobalVariable(Val: LLVMValueRef) -> LLVMValueRef;
1351 pub fn LLVMIsAUndefValue(Val: LLVMValueRef) -> LLVMValueRef;
1352 pub fn LLVMIsAPoisonValue(Val: LLVMValueRef) -> LLVMValueRef;
1353 pub fn LLVMIsAInstruction(Val: LLVMValueRef) -> LLVMValueRef;
1354 pub fn LLVMIsAUnaryOperator(Val: LLVMValueRef) -> LLVMValueRef;
1355 pub fn LLVMIsABinaryOperator(Val: LLVMValueRef) -> LLVMValueRef;
1356 pub fn LLVMIsACallInst(Val: LLVMValueRef) -> LLVMValueRef;
1357 pub fn LLVMIsAIntrinsicInst(Val: LLVMValueRef) -> LLVMValueRef;
1358 pub fn LLVMIsADbgInfoIntrinsic(Val: LLVMValueRef) -> LLVMValueRef;
1359 pub fn LLVMIsADbgVariableIntrinsic(Val: LLVMValueRef) -> LLVMValueRef;
1360 pub fn LLVMIsADbgDeclareInst(Val: LLVMValueRef) -> LLVMValueRef;
1361 pub fn LLVMIsADbgLabelInst(Val: LLVMValueRef) -> LLVMValueRef;
1362 pub fn LLVMIsAMemIntrinsic(Val: LLVMValueRef) -> LLVMValueRef;
1363 pub fn LLVMIsAMemCpyInst(Val: LLVMValueRef) -> LLVMValueRef;
1364 pub fn LLVMIsAMemMoveInst(Val: LLVMValueRef) -> LLVMValueRef;
1365 pub fn LLVMIsAMemSetInst(Val: LLVMValueRef) -> LLVMValueRef;
1366 pub fn LLVMIsACmpInst(Val: LLVMValueRef) -> LLVMValueRef;
1367 pub fn LLVMIsAFCmpInst(Val: LLVMValueRef) -> LLVMValueRef;
1368 pub fn LLVMIsAICmpInst(Val: LLVMValueRef) -> LLVMValueRef;
1369 pub fn LLVMIsAExtractElementInst(Val: LLVMValueRef) -> LLVMValueRef;
1370 pub fn LLVMIsAGetElementPtrInst(Val: LLVMValueRef) -> LLVMValueRef;
1371 pub fn LLVMIsAInsertElementInst(Val: LLVMValueRef) -> LLVMValueRef;
1372 pub fn LLVMIsAInsertValueInst(Val: LLVMValueRef) -> LLVMValueRef;
1373 pub fn LLVMIsALandingPadInst(Val: LLVMValueRef) -> LLVMValueRef;
1374 pub fn LLVMIsAPHINode(Val: LLVMValueRef) -> LLVMValueRef;
1375 pub fn LLVMIsASelectInst(Val: LLVMValueRef) -> LLVMValueRef;
1376 pub fn LLVMIsAShuffleVectorInst(Val: LLVMValueRef) -> LLVMValueRef;
1377 pub fn LLVMIsAStoreInst(Val: LLVMValueRef) -> LLVMValueRef;
1378 pub fn LLVMIsABranchInst(Val: LLVMValueRef) -> LLVMValueRef;
1379 pub fn LLVMIsAIndirectBrInst(Val: LLVMValueRef) -> LLVMValueRef;
1380 pub fn LLVMIsAInvokeInst(Val: LLVMValueRef) -> LLVMValueRef;
1381 pub fn LLVMIsAReturnInst(Val: LLVMValueRef) -> LLVMValueRef;
1382 pub fn LLVMIsASwitchInst(Val: LLVMValueRef) -> LLVMValueRef;
1383 pub fn LLVMIsAUnreachableInst(Val: LLVMValueRef) -> LLVMValueRef;
1384 pub fn LLVMIsAResumeInst(Val: LLVMValueRef) -> LLVMValueRef;
1385 pub fn LLVMIsACleanupReturnInst(Val: LLVMValueRef) -> LLVMValueRef;
1386 pub fn LLVMIsACatchReturnInst(Val: LLVMValueRef) -> LLVMValueRef;
1387 pub fn LLVMIsACatchSwitchInst(Val: LLVMValueRef) -> LLVMValueRef;
1388 pub fn LLVMIsACallBrInst(Val: LLVMValueRef) -> LLVMValueRef;
1389 pub fn LLVMIsAFuncletPadInst(Val: LLVMValueRef) -> LLVMValueRef;
1390 pub fn LLVMIsACatchPadInst(Val: LLVMValueRef) -> LLVMValueRef;
1391 pub fn LLVMIsACleanupPadInst(Val: LLVMValueRef) -> LLVMValueRef;
1392 pub fn LLVMIsAUnaryInstruction(Val: LLVMValueRef) -> LLVMValueRef;
1393 pub fn LLVMIsAAllocaInst(Val: LLVMValueRef) -> LLVMValueRef;
1394 pub fn LLVMIsACastInst(Val: LLVMValueRef) -> LLVMValueRef;
1395 pub fn LLVMIsAAddrSpaceCastInst(Val: LLVMValueRef) -> LLVMValueRef;
1396 pub fn LLVMIsABitCastInst(Val: LLVMValueRef) -> LLVMValueRef;
1397 pub fn LLVMIsAFPExtInst(Val: LLVMValueRef) -> LLVMValueRef;
1398 pub fn LLVMIsAFPToSIInst(Val: LLVMValueRef) -> LLVMValueRef;
1399 pub fn LLVMIsAFPToUIInst(Val: LLVMValueRef) -> LLVMValueRef;
1400 pub fn LLVMIsAFPTruncInst(Val: LLVMValueRef) -> LLVMValueRef;
1401 pub fn LLVMIsAIntToPtrInst(Val: LLVMValueRef) -> LLVMValueRef;
1402 pub fn LLVMIsAPtrToIntInst(Val: LLVMValueRef) -> LLVMValueRef;
1403 pub fn LLVMIsASExtInst(Val: LLVMValueRef) -> LLVMValueRef;
1404 pub fn LLVMIsASIToFPInst(Val: LLVMValueRef) -> LLVMValueRef;
1405 pub fn LLVMIsATruncInst(Val: LLVMValueRef) -> LLVMValueRef;
1406 pub fn LLVMIsAUIToFPInst(Val: LLVMValueRef) -> LLVMValueRef;
1407 pub fn LLVMIsAZExtInst(Val: LLVMValueRef) -> LLVMValueRef;
1408 pub fn LLVMIsAExtractValueInst(Val: LLVMValueRef) -> LLVMValueRef;
1409 pub fn LLVMIsALoadInst(Val: LLVMValueRef) -> LLVMValueRef;
1410 pub fn LLVMIsAVAArgInst(Val: LLVMValueRef) -> LLVMValueRef;
1411 pub fn LLVMIsAFreezeInst(Val: LLVMValueRef) -> LLVMValueRef;
1412 pub fn LLVMIsAAtomicCmpXchgInst(Val: LLVMValueRef) -> LLVMValueRef;
1413 pub fn LLVMIsAAtomicRMWInst(Val: LLVMValueRef) -> LLVMValueRef;
1414 pub fn LLVMIsAFenceInst(Val: LLVMValueRef) -> LLVMValueRef;
1415}
1416
1417extern "C" {
1419 pub fn LLVMGetNumIndices(Inst: LLVMValueRef) -> ::libc::c_uint;
1421 pub fn LLVMGetIndices(Inst: LLVMValueRef) -> *const ::libc::c_uint;
1422}
1423
1424extern "C" {
1426 pub fn LLVMCreateBuilderInContext(C: LLVMContextRef) -> LLVMBuilderRef;
1427 pub fn LLVMCreateBuilder() -> LLVMBuilderRef;
1428 pub fn LLVMPositionBuilder(
1431 Builder: LLVMBuilderRef,
1432 Block: LLVMBasicBlockRef,
1433 Instr: LLVMValueRef,
1434 );
1435 pub fn LLVMPositionBuilderBeforeDbgRecords(
1438 Builder: LLVMBuilderRef,
1439 Block: LLVMBasicBlockRef,
1440 Inst: LLVMValueRef,
1441 );
1442 pub fn LLVMPositionBuilderBefore(Builder: LLVMBuilderRef, Instr: LLVMValueRef);
1444 pub fn LLVMPositionBuilderBeforeInstrAndDbgRecords(
1446 Builder: LLVMBuilderRef,
1447 Instr: LLVMValueRef,
1448 );
1449 pub fn LLVMPositionBuilderAtEnd(Builder: LLVMBuilderRef, Block: LLVMBasicBlockRef);
1450 pub fn LLVMGetInsertBlock(Builder: LLVMBuilderRef) -> LLVMBasicBlockRef;
1451 pub fn LLVMClearInsertionPosition(Builder: LLVMBuilderRef);
1452 pub fn LLVMInsertIntoBuilder(Builder: LLVMBuilderRef, Instr: LLVMValueRef);
1453 pub fn LLVMInsertIntoBuilderWithName(
1454 Builder: LLVMBuilderRef,
1455 Instr: LLVMValueRef,
1456 Name: *const ::libc::c_char,
1457 );
1458 pub fn LLVMDisposeBuilder(Builder: LLVMBuilderRef);
1459
1460 pub fn LLVMGetCurrentDebugLocation2(Builder: LLVMBuilderRef) -> LLVMMetadataRef;
1463 pub fn LLVMSetCurrentDebugLocation2(Builder: LLVMBuilderRef, Loc: LLVMMetadataRef);
1465 #[deprecated(
1469 since = "14.0",
1470 note = "Deprecated in favor of the more general LLVMAddMetadataToInst."
1471 )]
1472 pub fn LLVMSetInstDebugLocation(Builder: LLVMBuilderRef, Inst: LLVMValueRef);
1473 pub fn LLVMAddMetadataToInst(Builder: LLVMBuilderRef, Inst: LLVMValueRef);
1475 pub fn LLVMBuilderGetDefaultFPMathTag(Builder: LLVMBuilderRef) -> LLVMMetadataRef;
1477 pub fn LLVMBuilderSetDefaultFPMathTag(Builder: LLVMBuilderRef, FPMathTag: LLVMMetadataRef);
1479 #[deprecated(since = "LLVM 9.0", note = "Use LLVMGetCurrentDebugLocation2 instead.")]
1480 pub fn LLVMSetCurrentDebugLocation(Builder: LLVMBuilderRef, L: LLVMValueRef);
1481 pub fn LLVMGetCurrentDebugLocation(Builder: LLVMBuilderRef) -> LLVMValueRef;
1482
1483 pub fn LLVMBuildRetVoid(arg1: LLVMBuilderRef) -> LLVMValueRef;
1485 pub fn LLVMBuildRet(arg1: LLVMBuilderRef, V: LLVMValueRef) -> LLVMValueRef;
1486 pub fn LLVMBuildAggregateRet(
1487 arg1: LLVMBuilderRef,
1488 RetVals: *mut LLVMValueRef,
1489 N: ::libc::c_uint,
1490 ) -> LLVMValueRef;
1491 pub fn LLVMBuildBr(arg1: LLVMBuilderRef, Dest: LLVMBasicBlockRef) -> LLVMValueRef;
1492 pub fn LLVMBuildCondBr(
1493 arg1: LLVMBuilderRef,
1494 If: LLVMValueRef,
1495 Then: LLVMBasicBlockRef,
1496 Else: LLVMBasicBlockRef,
1497 ) -> LLVMValueRef;
1498 pub fn LLVMBuildSwitch(
1499 arg1: LLVMBuilderRef,
1500 V: LLVMValueRef,
1501 Else: LLVMBasicBlockRef,
1502 NumCases: ::libc::c_uint,
1503 ) -> LLVMValueRef;
1504 pub fn LLVMBuildIndirectBr(
1505 B: LLVMBuilderRef,
1506 Addr: LLVMValueRef,
1507 NumDests: ::libc::c_uint,
1508 ) -> LLVMValueRef;
1509 pub fn LLVMBuildCallBr(
1510 B: LLVMBuilderRef,
1511 Ty: LLVMTypeRef,
1512 Fn: LLVMValueRef,
1513 DefaultDest: LLVMBasicBlockRef,
1514 IndirectDests: *mut LLVMBasicBlockRef,
1515 NumIndirectDests: ::libc::c_uint,
1516 Args: *mut LLVMValueRef,
1517 NumArgs: ::libc::c_uint,
1518 Bundles: *mut LLVMOperandBundleRef,
1519 NumBundles: ::libc::c_uint,
1520 Name: *const ::libc::c_char,
1521 ) -> LLVMValueRef;
1522 pub fn LLVMBuildInvoke2(
1523 arg1: LLVMBuilderRef,
1524 Ty: LLVMTypeRef,
1525 Fn: LLVMValueRef,
1526 Args: *mut LLVMValueRef,
1527 NumArgs: ::libc::c_uint,
1528 Then: LLVMBasicBlockRef,
1529 Catch: LLVMBasicBlockRef,
1530 Name: *const ::libc::c_char,
1531 ) -> LLVMValueRef;
1532 pub fn LLVMBuildInvokeWithOperandBundles(
1533 arg1: LLVMBuilderRef,
1534 Ty: LLVMTypeRef,
1535 Fn: LLVMValueRef,
1536 Args: *mut LLVMValueRef,
1537 NumArgs: ::libc::c_uint,
1538 Then: LLVMBasicBlockRef,
1539 Catch: LLVMBasicBlockRef,
1540 Bundles: *mut LLVMOperandBundleRef,
1541 NumBundles: ::libc::c_uint,
1542 Name: *const ::libc::c_char,
1543 ) -> LLVMValueRef;
1544 pub fn LLVMBuildUnreachable(B: LLVMBuilderRef) -> LLVMValueRef;
1545
1546 pub fn LLVMBuildResume(B: LLVMBuilderRef, Exn: LLVMValueRef) -> LLVMValueRef;
1547 pub fn LLVMBuildLandingPad(
1548 B: LLVMBuilderRef,
1549 Ty: LLVMTypeRef,
1550 PersFn: LLVMValueRef,
1551 NumClauses: ::libc::c_uint,
1552 Name: *const ::libc::c_char,
1553 ) -> LLVMValueRef;
1554 pub fn LLVMBuildCleanupRet(
1555 B: LLVMBuilderRef,
1556 CatchPad: LLVMValueRef,
1557 BB: LLVMBasicBlockRef,
1558 ) -> LLVMValueRef;
1559 pub fn LLVMBuildCatchRet(
1560 B: LLVMBuilderRef,
1561 CatchPad: LLVMValueRef,
1562 BB: LLVMBasicBlockRef,
1563 ) -> LLVMValueRef;
1564 pub fn LLVMBuildCatchPad(
1565 B: LLVMBuilderRef,
1566 ParentPad: LLVMValueRef,
1567 Args: *mut LLVMValueRef,
1568 NumArgs: ::libc::c_uint,
1569 Name: *const ::libc::c_char,
1570 ) -> LLVMValueRef;
1571 pub fn LLVMBuildCleanupPad(
1572 B: LLVMBuilderRef,
1573 ParentPad: LLVMValueRef,
1574 Args: *mut LLVMValueRef,
1575 NumArgs: ::libc::c_uint,
1576 Name: *const ::libc::c_char,
1577 ) -> LLVMValueRef;
1578 pub fn LLVMBuildCatchSwitch(
1579 B: LLVMBuilderRef,
1580 ParentPad: LLVMValueRef,
1581 UnwindBB: LLVMBasicBlockRef,
1582 NumHandler: ::libc::c_uint,
1583 Name: *const ::libc::c_char,
1584 ) -> LLVMValueRef;
1585
1586 pub fn LLVMAddCase(Switch: LLVMValueRef, OnVal: LLVMValueRef, Dest: LLVMBasicBlockRef);
1588
1589 pub fn LLVMAddDestination(IndirectBr: LLVMValueRef, Dest: LLVMBasicBlockRef);
1591
1592 pub fn LLVMGetNumClauses(LandingPad: LLVMValueRef) -> ::libc::c_uint;
1594
1595 pub fn LLVMGetClause(LandingPad: LLVMValueRef, Idx: ::libc::c_uint) -> LLVMValueRef;
1597
1598 pub fn LLVMAddClause(LandingPad: LLVMValueRef, ClauseVal: LLVMValueRef);
1600
1601 pub fn LLVMIsCleanup(LandingPad: LLVMValueRef) -> LLVMBool;
1603
1604 pub fn LLVMSetCleanup(LandingPad: LLVMValueRef, Val: LLVMBool);
1606
1607 pub fn LLVMAddHandler(CatchSwitch: LLVMValueRef, Dest: LLVMBasicBlockRef);
1609
1610 pub fn LLVMGetNumHandlers(CatchSwitch: LLVMValueRef) -> ::libc::c_uint;
1612
1613 pub fn LLVMGetHandlers(CatchSwitch: LLVMValueRef, Handlers: *mut LLVMBasicBlockRef);
1617
1618 pub fn LLVMGetArgOperand(Funclet: LLVMValueRef, i: ::libc::c_uint) -> LLVMValueRef;
1621
1622 pub fn LLVMSetArgOperand(Funclet: LLVMValueRef, i: ::libc::c_uint, value: LLVMValueRef);
1624
1625 pub fn LLVMGetParentCatchSwitch(CatchPad: LLVMValueRef) -> LLVMValueRef;
1629
1630 pub fn LLVMSetParentCatchSwitch(CatchPad: LLVMValueRef, CatchSwitch: LLVMValueRef);
1633
1634 pub fn LLVMBuildAdd(
1636 arg1: LLVMBuilderRef,
1637 LHS: LLVMValueRef,
1638 RHS: LLVMValueRef,
1639 Name: *const ::libc::c_char,
1640 ) -> LLVMValueRef;
1641 pub fn LLVMBuildNSWAdd(
1642 arg1: LLVMBuilderRef,
1643 LHS: LLVMValueRef,
1644 RHS: LLVMValueRef,
1645 Name: *const ::libc::c_char,
1646 ) -> LLVMValueRef;
1647 pub fn LLVMBuildNUWAdd(
1648 arg1: LLVMBuilderRef,
1649 LHS: LLVMValueRef,
1650 RHS: LLVMValueRef,
1651 Name: *const ::libc::c_char,
1652 ) -> LLVMValueRef;
1653 pub fn LLVMBuildFAdd(
1654 arg1: LLVMBuilderRef,
1655 LHS: LLVMValueRef,
1656 RHS: LLVMValueRef,
1657 Name: *const ::libc::c_char,
1658 ) -> LLVMValueRef;
1659 pub fn LLVMBuildSub(
1660 arg1: LLVMBuilderRef,
1661 LHS: LLVMValueRef,
1662 RHS: LLVMValueRef,
1663 Name: *const ::libc::c_char,
1664 ) -> LLVMValueRef;
1665 pub fn LLVMBuildNSWSub(
1666 arg1: LLVMBuilderRef,
1667 LHS: LLVMValueRef,
1668 RHS: LLVMValueRef,
1669 Name: *const ::libc::c_char,
1670 ) -> LLVMValueRef;
1671 pub fn LLVMBuildNUWSub(
1672 arg1: LLVMBuilderRef,
1673 LHS: LLVMValueRef,
1674 RHS: LLVMValueRef,
1675 Name: *const ::libc::c_char,
1676 ) -> LLVMValueRef;
1677 pub fn LLVMBuildFSub(
1678 arg1: LLVMBuilderRef,
1679 LHS: LLVMValueRef,
1680 RHS: LLVMValueRef,
1681 Name: *const ::libc::c_char,
1682 ) -> LLVMValueRef;
1683 pub fn LLVMBuildMul(
1684 arg1: LLVMBuilderRef,
1685 LHS: LLVMValueRef,
1686 RHS: LLVMValueRef,
1687 Name: *const ::libc::c_char,
1688 ) -> LLVMValueRef;
1689 pub fn LLVMBuildNSWMul(
1690 arg1: LLVMBuilderRef,
1691 LHS: LLVMValueRef,
1692 RHS: LLVMValueRef,
1693 Name: *const ::libc::c_char,
1694 ) -> LLVMValueRef;
1695 pub fn LLVMBuildNUWMul(
1696 arg1: LLVMBuilderRef,
1697 LHS: LLVMValueRef,
1698 RHS: LLVMValueRef,
1699 Name: *const ::libc::c_char,
1700 ) -> LLVMValueRef;
1701 pub fn LLVMBuildFMul(
1702 arg1: LLVMBuilderRef,
1703 LHS: LLVMValueRef,
1704 RHS: LLVMValueRef,
1705 Name: *const ::libc::c_char,
1706 ) -> LLVMValueRef;
1707 pub fn LLVMBuildUDiv(
1708 arg1: LLVMBuilderRef,
1709 LHS: LLVMValueRef,
1710 RHS: LLVMValueRef,
1711 Name: *const ::libc::c_char,
1712 ) -> LLVMValueRef;
1713 pub fn LLVMBuildExactUDiv(
1714 arg1: LLVMBuilderRef,
1715 LHS: LLVMValueRef,
1716 RHS: LLVMValueRef,
1717 Name: *const ::libc::c_char,
1718 ) -> LLVMValueRef;
1719 pub fn LLVMBuildSDiv(
1720 arg1: LLVMBuilderRef,
1721 LHS: LLVMValueRef,
1722 RHS: LLVMValueRef,
1723 Name: *const ::libc::c_char,
1724 ) -> LLVMValueRef;
1725 pub fn LLVMBuildExactSDiv(
1726 arg1: LLVMBuilderRef,
1727 LHS: LLVMValueRef,
1728 RHS: LLVMValueRef,
1729 Name: *const ::libc::c_char,
1730 ) -> LLVMValueRef;
1731 pub fn LLVMBuildFDiv(
1732 arg1: LLVMBuilderRef,
1733 LHS: LLVMValueRef,
1734 RHS: LLVMValueRef,
1735 Name: *const ::libc::c_char,
1736 ) -> LLVMValueRef;
1737 pub fn LLVMBuildURem(
1738 arg1: LLVMBuilderRef,
1739 LHS: LLVMValueRef,
1740 RHS: LLVMValueRef,
1741 Name: *const ::libc::c_char,
1742 ) -> LLVMValueRef;
1743 pub fn LLVMBuildSRem(
1744 arg1: LLVMBuilderRef,
1745 LHS: LLVMValueRef,
1746 RHS: LLVMValueRef,
1747 Name: *const ::libc::c_char,
1748 ) -> LLVMValueRef;
1749 pub fn LLVMBuildFRem(
1750 arg1: LLVMBuilderRef,
1751 LHS: LLVMValueRef,
1752 RHS: LLVMValueRef,
1753 Name: *const ::libc::c_char,
1754 ) -> LLVMValueRef;
1755 pub fn LLVMBuildShl(
1756 arg1: LLVMBuilderRef,
1757 LHS: LLVMValueRef,
1758 RHS: LLVMValueRef,
1759 Name: *const ::libc::c_char,
1760 ) -> LLVMValueRef;
1761 pub fn LLVMBuildLShr(
1762 arg1: LLVMBuilderRef,
1763 LHS: LLVMValueRef,
1764 RHS: LLVMValueRef,
1765 Name: *const ::libc::c_char,
1766 ) -> LLVMValueRef;
1767 pub fn LLVMBuildAShr(
1768 arg1: LLVMBuilderRef,
1769 LHS: LLVMValueRef,
1770 RHS: LLVMValueRef,
1771 Name: *const ::libc::c_char,
1772 ) -> LLVMValueRef;
1773 pub fn LLVMBuildAnd(
1774 arg1: LLVMBuilderRef,
1775 LHS: LLVMValueRef,
1776 RHS: LLVMValueRef,
1777 Name: *const ::libc::c_char,
1778 ) -> LLVMValueRef;
1779 pub fn LLVMBuildOr(
1780 arg1: LLVMBuilderRef,
1781 LHS: LLVMValueRef,
1782 RHS: LLVMValueRef,
1783 Name: *const ::libc::c_char,
1784 ) -> LLVMValueRef;
1785 pub fn LLVMBuildXor(
1786 arg1: LLVMBuilderRef,
1787 LHS: LLVMValueRef,
1788 RHS: LLVMValueRef,
1789 Name: *const ::libc::c_char,
1790 ) -> LLVMValueRef;
1791 pub fn LLVMBuildBinOp(
1792 B: LLVMBuilderRef,
1793 Op: LLVMOpcode,
1794 LHS: LLVMValueRef,
1795 RHS: LLVMValueRef,
1796 Name: *const ::libc::c_char,
1797 ) -> LLVMValueRef;
1798 pub fn LLVMBuildNeg(
1799 arg1: LLVMBuilderRef,
1800 V: LLVMValueRef,
1801 Name: *const ::libc::c_char,
1802 ) -> LLVMValueRef;
1803 pub fn LLVMBuildNSWNeg(
1804 B: LLVMBuilderRef,
1805 V: LLVMValueRef,
1806 Name: *const ::libc::c_char,
1807 ) -> LLVMValueRef;
1808 #[deprecated(since = "19.1", note = "Use LLVMBuildNeg + LLVMSetNUW instead.")]
1809 pub fn LLVMBuildNUWNeg(
1810 B: LLVMBuilderRef,
1811 V: LLVMValueRef,
1812 Name: *const ::libc::c_char,
1813 ) -> LLVMValueRef;
1814 pub fn LLVMBuildFNeg(
1815 arg1: LLVMBuilderRef,
1816 V: LLVMValueRef,
1817 Name: *const ::libc::c_char,
1818 ) -> LLVMValueRef;
1819 pub fn LLVMBuildNot(
1820 arg1: LLVMBuilderRef,
1821 V: LLVMValueRef,
1822 Name: *const ::libc::c_char,
1823 ) -> LLVMValueRef;
1824
1825 pub fn LLVMGetNUW(ArithInst: LLVMValueRef) -> LLVMBool;
1826 pub fn LLVMSetNUW(ArithInst: LLVMValueRef, HasNUW: LLVMBool);
1827 pub fn LLVMGetNSW(ArithInst: LLVMValueRef) -> LLVMBool;
1828 pub fn LLVMSetNSW(ArithInst: LLVMValueRef, HasNSW: LLVMBool);
1829 pub fn LLVMGetExact(DivOrShrInst: LLVMValueRef) -> LLVMBool;
1830 pub fn LLVMSetExact(DivOrShrInst: LLVMValueRef, IsExact: LLVMBool);
1831
1832 pub fn LLVMGetNNeg(NonNegInst: LLVMValueRef) -> LLVMBool;
1836
1837 pub fn LLVMSetNNeg(NonNegInst: LLVMValueRef, IsNonNeg: LLVMBool);
1841
1842 pub fn LLVMGetFastMathFlags(FPMathInst: LLVMValueRef) -> LLVMFastMathFlags;
1846
1847 pub fn LLVMSetFastMathFlags(FPMathInst: LLVMValueRef, FMF: LLVMFastMathFlags);
1851
1852 pub fn LLVMCanValueUseFastMathFlags(Inst: LLVMValueRef) -> LLVMBool;
1858
1859 pub fn LLVMGetIsDisjoint(Inst: LLVMValueRef) -> LLVMBool;
1863
1864 pub fn LLVMSetIsDisjoint(Inst: LLVMValueRef, IsDisjoint: LLVMBool);
1868
1869 pub fn LLVMBuildMalloc(
1871 arg1: LLVMBuilderRef,
1872 Ty: LLVMTypeRef,
1873 Name: *const ::libc::c_char,
1874 ) -> LLVMValueRef;
1875 pub fn LLVMBuildArrayMalloc(
1876 arg1: LLVMBuilderRef,
1877 Ty: LLVMTypeRef,
1878 Val: LLVMValueRef,
1879 Name: *const ::libc::c_char,
1880 ) -> LLVMValueRef;
1881 pub fn LLVMBuildMemSet(
1882 B: LLVMBuilderRef,
1883 Ptr: LLVMValueRef,
1884 Val: LLVMValueRef,
1885 Len: LLVMValueRef,
1886 Align: ::libc::c_uint,
1887 ) -> LLVMValueRef;
1888 pub fn LLVMBuildMemCpy(
1889 B: LLVMBuilderRef,
1890 Dst: LLVMValueRef,
1891 DstAlign: ::libc::c_uint,
1892 Src: LLVMValueRef,
1893 SrcAlign: ::libc::c_uint,
1894 Size: LLVMValueRef,
1895 ) -> LLVMValueRef;
1896 pub fn LLVMBuildMemMove(
1897 B: LLVMBuilderRef,
1898 Dst: LLVMValueRef,
1899 DstAlign: ::libc::c_uint,
1900 Src: LLVMValueRef,
1901 SrcAlign: ::libc::c_uint,
1902 Size: LLVMValueRef,
1903 ) -> LLVMValueRef;
1904 pub fn LLVMBuildAlloca(
1905 arg1: LLVMBuilderRef,
1906 Ty: LLVMTypeRef,
1907 Name: *const ::libc::c_char,
1908 ) -> LLVMValueRef;
1909 pub fn LLVMBuildArrayAlloca(
1910 arg1: LLVMBuilderRef,
1911 Ty: LLVMTypeRef,
1912 Val: LLVMValueRef,
1913 Name: *const ::libc::c_char,
1914 ) -> LLVMValueRef;
1915 pub fn LLVMBuildFree(arg1: LLVMBuilderRef, PointerVal: LLVMValueRef) -> LLVMValueRef;
1916 pub fn LLVMBuildLoad2(
1917 arg1: LLVMBuilderRef,
1918 Ty: LLVMTypeRef,
1919 PointerVal: LLVMValueRef,
1920 Name: *const ::libc::c_char,
1921 ) -> LLVMValueRef;
1922 pub fn LLVMBuildStore(
1923 arg1: LLVMBuilderRef,
1924 Val: LLVMValueRef,
1925 Ptr: LLVMValueRef,
1926 ) -> LLVMValueRef;
1927 pub fn LLVMBuildGEP2(
1928 B: LLVMBuilderRef,
1929 Ty: LLVMTypeRef,
1930 Pointer: LLVMValueRef,
1931 Indices: *mut LLVMValueRef,
1932 NumIndices: ::libc::c_uint,
1933 Name: *const ::libc::c_char,
1934 ) -> LLVMValueRef;
1935 pub fn LLVMBuildInBoundsGEP2(
1936 B: LLVMBuilderRef,
1937 Ty: LLVMTypeRef,
1938 Pointer: LLVMValueRef,
1939 Indices: *mut LLVMValueRef,
1940 NumIndices: ::libc::c_uint,
1941 Name: *const ::libc::c_char,
1942 ) -> LLVMValueRef;
1943 pub fn LLVMBuildGEPWithNoWrapFlags(
1947 B: LLVMBuilderRef,
1948 Ty: LLVMTypeRef,
1949 Pointer: LLVMValueRef,
1950 Indices: *mut LLVMValueRef,
1951 NumIndices: ::libc::c_uint,
1952 Name: *const ::libc::c_char,
1953 NoWrapFlags: LLVMGEPNoWrapFlags,
1954 ) -> LLVMValueRef;
1955 pub fn LLVMBuildStructGEP2(
1956 B: LLVMBuilderRef,
1957 Ty: LLVMTypeRef,
1958 Pointer: LLVMValueRef,
1959 Idx: ::libc::c_uint,
1960 Name: *const ::libc::c_char,
1961 ) -> LLVMValueRef;
1962 pub fn LLVMBuildGlobalString(
1963 B: LLVMBuilderRef,
1964 Str: *const ::libc::c_char,
1965 Name: *const ::libc::c_char,
1966 ) -> LLVMValueRef;
1967 pub fn LLVMBuildGlobalStringPtr(
1968 B: LLVMBuilderRef,
1969 Str: *const ::libc::c_char,
1970 Name: *const ::libc::c_char,
1971 ) -> LLVMValueRef;
1972 pub fn LLVMGetVolatile(MemoryAccessInst: LLVMValueRef) -> LLVMBool;
1973 pub fn LLVMSetVolatile(MemoryAccessInst: LLVMValueRef, IsVolatile: LLVMBool);
1974 pub fn LLVMGetWeak(CmpXchgInst: LLVMValueRef) -> LLVMBool;
1975 pub fn LLVMSetWeak(CmpXchgInst: LLVMValueRef, IsWeak: LLVMBool);
1976 pub fn LLVMGetOrdering(MemoryAccessInst: LLVMValueRef) -> LLVMAtomicOrdering;
1977 pub fn LLVMSetOrdering(MemoryAccessInst: LLVMValueRef, Ordering: LLVMAtomicOrdering);
1978 pub fn LLVMGetAtomicRMWBinOp(AtomicRMWInst: LLVMValueRef) -> LLVMAtomicRMWBinOp;
1979 pub fn LLVMSetAtomicRMWBinOp(AtomicRMWInst: LLVMValueRef, BinOp: LLVMAtomicRMWBinOp);
1980
1981 pub fn LLVMBuildTrunc(
1983 arg1: LLVMBuilderRef,
1984 Val: LLVMValueRef,
1985 DestTy: LLVMTypeRef,
1986 Name: *const ::libc::c_char,
1987 ) -> LLVMValueRef;
1988 pub fn LLVMBuildZExt(
1989 arg1: LLVMBuilderRef,
1990 Val: LLVMValueRef,
1991 DestTy: LLVMTypeRef,
1992 Name: *const ::libc::c_char,
1993 ) -> LLVMValueRef;
1994 pub fn LLVMBuildSExt(
1995 arg1: LLVMBuilderRef,
1996 Val: LLVMValueRef,
1997 DestTy: LLVMTypeRef,
1998 Name: *const ::libc::c_char,
1999 ) -> LLVMValueRef;
2000 pub fn LLVMBuildFPToUI(
2001 arg1: LLVMBuilderRef,
2002 Val: LLVMValueRef,
2003 DestTy: LLVMTypeRef,
2004 Name: *const ::libc::c_char,
2005 ) -> LLVMValueRef;
2006 pub fn LLVMBuildFPToSI(
2007 arg1: LLVMBuilderRef,
2008 Val: LLVMValueRef,
2009 DestTy: LLVMTypeRef,
2010 Name: *const ::libc::c_char,
2011 ) -> LLVMValueRef;
2012 pub fn LLVMBuildUIToFP(
2013 arg1: LLVMBuilderRef,
2014 Val: LLVMValueRef,
2015 DestTy: LLVMTypeRef,
2016 Name: *const ::libc::c_char,
2017 ) -> LLVMValueRef;
2018 pub fn LLVMBuildSIToFP(
2019 arg1: LLVMBuilderRef,
2020 Val: LLVMValueRef,
2021 DestTy: LLVMTypeRef,
2022 Name: *const ::libc::c_char,
2023 ) -> LLVMValueRef;
2024 pub fn LLVMBuildFPTrunc(
2025 arg1: LLVMBuilderRef,
2026 Val: LLVMValueRef,
2027 DestTy: LLVMTypeRef,
2028 Name: *const ::libc::c_char,
2029 ) -> LLVMValueRef;
2030 pub fn LLVMBuildFPExt(
2031 arg1: LLVMBuilderRef,
2032 Val: LLVMValueRef,
2033 DestTy: LLVMTypeRef,
2034 Name: *const ::libc::c_char,
2035 ) -> LLVMValueRef;
2036 pub fn LLVMBuildPtrToInt(
2037 arg1: LLVMBuilderRef,
2038 Val: LLVMValueRef,
2039 DestTy: LLVMTypeRef,
2040 Name: *const ::libc::c_char,
2041 ) -> LLVMValueRef;
2042 pub fn LLVMBuildIntToPtr(
2043 arg1: LLVMBuilderRef,
2044 Val: LLVMValueRef,
2045 DestTy: LLVMTypeRef,
2046 Name: *const ::libc::c_char,
2047 ) -> LLVMValueRef;
2048 pub fn LLVMBuildBitCast(
2049 arg1: LLVMBuilderRef,
2050 Val: LLVMValueRef,
2051 DestTy: LLVMTypeRef,
2052 Name: *const ::libc::c_char,
2053 ) -> LLVMValueRef;
2054 pub fn LLVMBuildAddrSpaceCast(
2055 arg1: LLVMBuilderRef,
2056 Val: LLVMValueRef,
2057 DestTy: LLVMTypeRef,
2058 Name: *const ::libc::c_char,
2059 ) -> LLVMValueRef;
2060 pub fn LLVMBuildZExtOrBitCast(
2061 arg1: LLVMBuilderRef,
2062 Val: LLVMValueRef,
2063 DestTy: LLVMTypeRef,
2064 Name: *const ::libc::c_char,
2065 ) -> LLVMValueRef;
2066 pub fn LLVMBuildSExtOrBitCast(
2067 arg1: LLVMBuilderRef,
2068 Val: LLVMValueRef,
2069 DestTy: LLVMTypeRef,
2070 Name: *const ::libc::c_char,
2071 ) -> LLVMValueRef;
2072 pub fn LLVMBuildTruncOrBitCast(
2073 arg1: LLVMBuilderRef,
2074 Val: LLVMValueRef,
2075 DestTy: LLVMTypeRef,
2076 Name: *const ::libc::c_char,
2077 ) -> LLVMValueRef;
2078 pub fn LLVMBuildCast(
2079 B: LLVMBuilderRef,
2080 Op: LLVMOpcode,
2081 Val: LLVMValueRef,
2082 DestTy: LLVMTypeRef,
2083 Name: *const ::libc::c_char,
2084 ) -> LLVMValueRef;
2085 pub fn LLVMBuildPointerCast(
2086 arg1: LLVMBuilderRef,
2087 Val: LLVMValueRef,
2088 DestTy: LLVMTypeRef,
2089 Name: *const ::libc::c_char,
2090 ) -> LLVMValueRef;
2091 pub fn LLVMBuildIntCast(
2092 arg1: LLVMBuilderRef,
2093 Val: LLVMValueRef,
2094 DestTy: LLVMTypeRef,
2095 Name: *const ::libc::c_char,
2096 ) -> LLVMValueRef;
2097 pub fn LLVMBuildIntCast2(
2098 arg1: LLVMBuilderRef,
2099 Val: LLVMValueRef,
2100 DestTy: LLVMTypeRef,
2101 IsSigned: LLVMBool,
2102 Name: *const ::libc::c_char,
2103 ) -> LLVMValueRef;
2104 pub fn LLVMBuildFPCast(
2105 arg1: LLVMBuilderRef,
2106 Val: LLVMValueRef,
2107 DestTy: LLVMTypeRef,
2108 Name: *const ::libc::c_char,
2109 ) -> LLVMValueRef;
2110 pub fn LLVMGetCastOpcode(
2111 arg1: LLVMValueRef,
2112 SrcIsSigned: LLVMBool,
2113 DestTy: LLVMTypeRef,
2114 DestIsSigned: LLVMBool,
2115 ) -> LLVMOpcode;
2116
2117 pub fn LLVMBuildICmp(
2119 arg1: LLVMBuilderRef,
2120 Op: LLVMIntPredicate,
2121 LHS: LLVMValueRef,
2122 RHS: LLVMValueRef,
2123 Name: *const ::libc::c_char,
2124 ) -> LLVMValueRef;
2125 pub fn LLVMBuildFCmp(
2126 arg1: LLVMBuilderRef,
2127 Op: LLVMRealPredicate,
2128 LHS: LLVMValueRef,
2129 RHS: LLVMValueRef,
2130 Name: *const ::libc::c_char,
2131 ) -> LLVMValueRef;
2132
2133 pub fn LLVMBuildPhi(
2135 arg1: LLVMBuilderRef,
2136 Ty: LLVMTypeRef,
2137 Name: *const ::libc::c_char,
2138 ) -> LLVMValueRef;
2139 pub fn LLVMBuildCall2(
2140 arg1: LLVMBuilderRef,
2141 arg2: LLVMTypeRef,
2142 Fn: LLVMValueRef,
2143 Args: *mut LLVMValueRef,
2144 NumArgs: ::libc::c_uint,
2145 Name: *const ::libc::c_char,
2146 ) -> LLVMValueRef;
2147 pub fn LLVMBuildCallWithOperandBundles(
2148 arg1: LLVMBuilderRef,
2149 arg2: LLVMTypeRef,
2150 Fn: LLVMValueRef,
2151 Args: *mut LLVMValueRef,
2152 NumArgs: ::libc::c_uint,
2153 Bundles: *mut LLVMOperandBundleRef,
2154 NumBundles: ::libc::c_uint,
2155 Name: *const ::libc::c_char,
2156 ) -> LLVMValueRef;
2157 pub fn LLVMBuildSelect(
2158 arg1: LLVMBuilderRef,
2159 If: LLVMValueRef,
2160 Then: LLVMValueRef,
2161 Else: LLVMValueRef,
2162 Name: *const ::libc::c_char,
2163 ) -> LLVMValueRef;
2164 pub fn LLVMBuildVAArg(
2165 arg1: LLVMBuilderRef,
2166 List: LLVMValueRef,
2167 Ty: LLVMTypeRef,
2168 Name: *const ::libc::c_char,
2169 ) -> LLVMValueRef;
2170 pub fn LLVMBuildExtractElement(
2171 arg1: LLVMBuilderRef,
2172 VecVal: LLVMValueRef,
2173 Index: LLVMValueRef,
2174 Name: *const ::libc::c_char,
2175 ) -> LLVMValueRef;
2176 pub fn LLVMBuildInsertElement(
2177 arg1: LLVMBuilderRef,
2178 VecVal: LLVMValueRef,
2179 EltVal: LLVMValueRef,
2180 Index: LLVMValueRef,
2181 Name: *const ::libc::c_char,
2182 ) -> LLVMValueRef;
2183 pub fn LLVMBuildShuffleVector(
2184 arg1: LLVMBuilderRef,
2185 V1: LLVMValueRef,
2186 V2: LLVMValueRef,
2187 Mask: LLVMValueRef,
2188 Name: *const ::libc::c_char,
2189 ) -> LLVMValueRef;
2190 pub fn LLVMBuildExtractValue(
2191 arg1: LLVMBuilderRef,
2192 AggVal: LLVMValueRef,
2193 Index: ::libc::c_uint,
2194 Name: *const ::libc::c_char,
2195 ) -> LLVMValueRef;
2196 pub fn LLVMBuildInsertValue(
2197 arg1: LLVMBuilderRef,
2198 AggVal: LLVMValueRef,
2199 EltVal: LLVMValueRef,
2200 Index: ::libc::c_uint,
2201 Name: *const ::libc::c_char,
2202 ) -> LLVMValueRef;
2203 pub fn LLVMBuildFreeze(
2204 arg1: LLVMBuilderRef,
2205 Val: LLVMValueRef,
2206 Name: *const ::libc::c_char,
2207 ) -> LLVMValueRef;
2208 pub fn LLVMBuildIsNull(
2209 arg1: LLVMBuilderRef,
2210 Val: LLVMValueRef,
2211 Name: *const ::libc::c_char,
2212 ) -> LLVMValueRef;
2213 pub fn LLVMBuildIsNotNull(
2214 arg1: LLVMBuilderRef,
2215 Val: LLVMValueRef,
2216 Name: *const ::libc::c_char,
2217 ) -> LLVMValueRef;
2218 pub fn LLVMBuildPtrDiff2(
2219 arg1: LLVMBuilderRef,
2220 ElemTy: LLVMTypeRef,
2221 LHS: LLVMValueRef,
2222 RHS: LLVMValueRef,
2223 Name: *const ::libc::c_char,
2224 ) -> LLVMValueRef;
2225 pub fn LLVMBuildFence(
2226 B: LLVMBuilderRef,
2227 ordering: LLVMAtomicOrdering,
2228 singleThread: LLVMBool,
2229 Name: *const ::libc::c_char,
2230 ) -> LLVMValueRef;
2231 pub fn LLVMBuildAtomicRMW(
2232 B: LLVMBuilderRef,
2233 op: LLVMAtomicRMWBinOp,
2234 PTR: LLVMValueRef,
2235 Val: LLVMValueRef,
2236 ordering: LLVMAtomicOrdering,
2237 singleThread: LLVMBool,
2238 ) -> LLVMValueRef;
2239 pub fn LLVMBuildAtomicCmpXchg(
2240 B: LLVMBuilderRef,
2241 Ptr: LLVMValueRef,
2242 Cmp: LLVMValueRef,
2243 New: LLVMValueRef,
2244 SuccessOrdering: LLVMAtomicOrdering,
2245 FailureOrdering: LLVMAtomicOrdering,
2246 SingleThread: LLVMBool,
2247 ) -> LLVMValueRef;
2248 pub fn LLVMGetNumMaskElements(ShuffleVectorInst: LLVMValueRef) -> ::libc::c_uint;
2249 pub fn LLVMGetUndefMaskElem() -> ::libc::c_int;
2250 pub fn LLVMGetMaskValue(ShuffleVectorInst: LLVMValueRef, Elt: ::libc::c_uint) -> ::libc::c_int;
2251 pub fn LLVMIsAtomicSingleThread(AtomicInst: LLVMValueRef) -> LLVMBool;
2252 pub fn LLVMSetAtomicSingleThread(AtomicInst: LLVMValueRef, SingleThread: LLVMBool);
2253 pub fn LLVMGetCmpXchgSuccessOrdering(CmpXchgInst: LLVMValueRef) -> LLVMAtomicOrdering;
2254 pub fn LLVMSetCmpXchgSuccessOrdering(CmpXchgInst: LLVMValueRef, Ordering: LLVMAtomicOrdering);
2255 pub fn LLVMGetCmpXchgFailureOrdering(CmpXchgInst: LLVMValueRef) -> LLVMAtomicOrdering;
2256 pub fn LLVMSetCmpXchgFailureOrdering(CmpXchgInst: LLVMValueRef, Ordering: LLVMAtomicOrdering);
2257}
2258
2259extern "C" {
2261 pub fn LLVMCreateModuleProviderForExistingModule(M: LLVMModuleRef) -> LLVMModuleProviderRef;
2262 pub fn LLVMDisposeModuleProvider(M: LLVMModuleProviderRef);
2263}
2264
2265extern "C" {
2267 pub fn LLVMCreateMemoryBufferWithContentsOfFile(
2268 Path: *const ::libc::c_char,
2269 OutMemBuf: *mut LLVMMemoryBufferRef,
2270 OutMessage: *mut *mut ::libc::c_char,
2271 ) -> LLVMBool;
2272 pub fn LLVMCreateMemoryBufferWithSTDIN(
2273 OutMemBuf: *mut LLVMMemoryBufferRef,
2274 OutMessage: *mut *mut ::libc::c_char,
2275 ) -> LLVMBool;
2276 pub fn LLVMCreateMemoryBufferWithMemoryRange(
2277 InputData: *const ::libc::c_char,
2278 InputDataLength: ::libc::size_t,
2279 BufferName: *const ::libc::c_char,
2280 RequiresNullTerminator: LLVMBool,
2281 ) -> LLVMMemoryBufferRef;
2282 pub fn LLVMCreateMemoryBufferWithMemoryRangeCopy(
2283 InputData: *const ::libc::c_char,
2284 InputDataLength: ::libc::size_t,
2285 BufferName: *const ::libc::c_char,
2286 ) -> LLVMMemoryBufferRef;
2287 pub fn LLVMGetBufferStart(MemBuf: LLVMMemoryBufferRef) -> *const ::libc::c_char;
2288 pub fn LLVMGetBufferSize(MemBuf: LLVMMemoryBufferRef) -> ::libc::size_t;
2289 pub fn LLVMDisposeMemoryBuffer(MemBuf: LLVMMemoryBufferRef);
2290}
2291
2292extern "C" {
2294 pub fn LLVMCreatePassManager() -> LLVMPassManagerRef;
2295 pub fn LLVMCreateFunctionPassManagerForModule(M: LLVMModuleRef) -> LLVMPassManagerRef;
2296 pub fn LLVMCreateFunctionPassManager(MP: LLVMModuleProviderRef) -> LLVMPassManagerRef;
2297 pub fn LLVMRunPassManager(PM: LLVMPassManagerRef, M: LLVMModuleRef) -> LLVMBool;
2298 pub fn LLVMInitializeFunctionPassManager(FPM: LLVMPassManagerRef) -> LLVMBool;
2299 pub fn LLVMRunFunctionPassManager(FPM: LLVMPassManagerRef, F: LLVMValueRef) -> LLVMBool;
2300 pub fn LLVMFinalizeFunctionPassManager(FPM: LLVMPassManagerRef) -> LLVMBool;
2301 pub fn LLVMDisposePassManager(PM: LLVMPassManagerRef);
2302}
2303
2304extern "C" {
2306 pub fn LLVMStartMultithreaded() -> LLVMBool;
2308 pub fn LLVMStopMultithreaded();
2310 pub fn LLVMIsMultithreaded() -> LLVMBool;
2311}