@@ -1018,7 +1018,7 @@ extern "C" {
1018
1018
pub fn LLVMSetDataLayout ( M : & Module , Triple : * const c_char ) ;
1019
1019
1020
1020
/// See Module::setModuleInlineAsm.
1021
- pub fn LLVMRustAppendModuleInlineAsm ( M : & Module , Asm : * const c_char , AsmLen : size_t ) ;
1021
+ pub fn LLVMAppendModuleInlineAsm ( M : & Module , Asm : * const c_char , Len : size_t ) ;
1022
1022
1023
1023
/// See llvm::LLVMTypeKind::getTypeID.
1024
1024
pub fn LLVMRustGetTypeKind ( Ty : & Type ) -> TypeKind ;
@@ -1065,7 +1065,7 @@ extern "C" {
1065
1065
1066
1066
// Operations on other types
1067
1067
pub fn LLVMVoidTypeInContext ( C : & Context ) -> & Type ;
1068
- pub fn LLVMRustMetadataTypeInContext ( C : & Context ) -> & Type ;
1068
+ pub fn LLVMMetadataTypeInContext ( C : & Context ) -> & Type ;
1069
1069
1070
1070
// Operations on all values
1071
1071
pub fn LLVMTypeOf ( Val : & Value ) -> & Type ;
@@ -1084,7 +1084,12 @@ extern "C" {
1084
1084
pub fn LLVMGetPoison ( Ty : & Type ) -> & Value ;
1085
1085
1086
1086
// Operations on metadata
1087
+ // FIXME: deprecated, replace with LLVMMDStringInContext2
1087
1088
pub fn LLVMMDStringInContext ( C : & Context , Str : * const c_char , SLen : c_uint ) -> & Value ;
1089
+
1090
+ pub fn LLVMMDStringInContext2 ( C : & Context , Str : * const c_char , SLen : size_t ) -> & Metadata ;
1091
+
1092
+ // FIXME: deprecated, replace with LLVMMDNodeInContext2
1088
1093
pub fn LLVMMDNodeInContext < ' a > (
1089
1094
C : & ' a Context ,
1090
1095
Vals : * const & ' a Value ,
@@ -1123,6 +1128,8 @@ extern "C" {
1123
1128
Packed : Bool ,
1124
1129
) -> & ' a Value ;
1125
1130
1131
+ // FIXME: replace with LLVMConstArray2 when bumped minimal version to llvm-17
1132
+ // https://github.com/llvm/llvm-project/commit/35276f16e5a2cae0dfb49c0fbf874d4d2f177acc
1126
1133
pub fn LLVMConstArray < ' a > (
1127
1134
ElementTy : & ' a Type ,
1128
1135
ConstantVals : * const & ' a Value ,
@@ -1262,7 +1269,7 @@ extern "C" {
1262
1269
pub fn LLVMDisposeBuilder < ' a > ( Builder : & ' a mut Builder < ' a > ) ;
1263
1270
1264
1271
// Metadata
1265
- pub fn LLVMSetCurrentDebugLocation < ' a > ( Builder : & Builder < ' a > , L : & ' a Value ) ;
1272
+ pub fn LLVMSetCurrentDebugLocation2 < ' a > ( Builder : & Builder < ' a > , Loc : & ' a Metadata ) ;
1266
1273
1267
1274
// Terminators
1268
1275
pub fn LLVMBuildRetVoid < ' a > ( B : & Builder < ' a > ) -> & ' a Value ;
@@ -1302,38 +1309,38 @@ extern "C" {
1302
1309
pub fn LLVMBuildResume < ' a > ( B : & Builder < ' a > , Exn : & ' a Value ) -> & ' a Value ;
1303
1310
pub fn LLVMBuildUnreachable < ' a > ( B : & Builder < ' a > ) -> & ' a Value ;
1304
1311
1305
- pub fn LLVMRustBuildCleanupPad < ' a > (
1312
+ pub fn LLVMBuildCleanupPad < ' a > (
1306
1313
B : & Builder < ' a > ,
1307
1314
ParentPad : Option < & ' a Value > ,
1308
- ArgCnt : c_uint ,
1309
1315
Args : * const & ' a Value ,
1316
+ NumArgs : c_uint ,
1310
1317
Name : * const c_char ,
1311
1318
) -> Option < & ' a Value > ;
1312
- pub fn LLVMRustBuildCleanupRet < ' a > (
1319
+ pub fn LLVMBuildCleanupRet < ' a > (
1313
1320
B : & Builder < ' a > ,
1314
1321
CleanupPad : & ' a Value ,
1315
- UnwindBB : Option < & ' a BasicBlock > ,
1322
+ BB : Option < & ' a BasicBlock > ,
1316
1323
) -> Option < & ' a Value > ;
1317
- pub fn LLVMRustBuildCatchPad < ' a > (
1324
+ pub fn LLVMBuildCatchPad < ' a > (
1318
1325
B : & Builder < ' a > ,
1319
1326
ParentPad : & ' a Value ,
1320
- ArgCnt : c_uint ,
1321
1327
Args : * const & ' a Value ,
1328
+ NumArgs : c_uint ,
1322
1329
Name : * const c_char ,
1323
1330
) -> Option < & ' a Value > ;
1324
- pub fn LLVMRustBuildCatchRet < ' a > (
1331
+ pub fn LLVMBuildCatchRet < ' a > (
1325
1332
B : & Builder < ' a > ,
1326
- Pad : & ' a Value ,
1333
+ CatchPad : & ' a Value ,
1327
1334
BB : & ' a BasicBlock ,
1328
1335
) -> Option < & ' a Value > ;
1329
- pub fn LLVMRustBuildCatchSwitch < ' a > (
1336
+ pub fn LLVMBuildCatchSwitch < ' a > (
1330
1337
Builder : & Builder < ' a > ,
1331
1338
ParentPad : Option < & ' a Value > ,
1332
- BB : Option < & ' a BasicBlock > ,
1339
+ UnwindBB : Option < & ' a BasicBlock > ,
1333
1340
NumHandlers : c_uint ,
1334
1341
Name : * const c_char ,
1335
1342
) -> Option < & ' a Value > ;
1336
- pub fn LLVMRustAddHandler < ' a > ( CatchSwitch : & ' a Value , Handler : & ' a BasicBlock ) ;
1343
+ pub fn LLVMAddHandler < ' a > ( CatchSwitch : & ' a Value , Dest : & ' a BasicBlock ) ;
1337
1344
pub fn LLVMSetPersonalityFn < ' a > ( Func : & ' a Value , Pers : & ' a Value ) ;
1338
1345
1339
1346
// Add a case to the switch instruction
@@ -1627,11 +1634,12 @@ extern "C" {
1627
1634
DestTy : & ' a Type ,
1628
1635
Name : * const c_char ,
1629
1636
) -> & ' a Value ;
1630
- pub fn LLVMRustBuildIntCast < ' a > (
1637
+ pub fn LLVMBuildIntCast2 < ' a > (
1631
1638
B : & Builder < ' a > ,
1632
1639
Val : & ' a Value ,
1633
1640
DestTy : & ' a Type ,
1634
- IsSigned : bool ,
1641
+ IsSigned : Bool ,
1642
+ Name : * const c_char ,
1635
1643
) -> & ' a Value ;
1636
1644
1637
1645
// Comparisons
@@ -1920,7 +1928,7 @@ extern "C" {
1920
1928
) ;
1921
1929
pub fn LLVMRustHasModuleFlag ( M : & Module , name : * const c_char , len : size_t ) -> bool ;
1922
1930
1923
- pub fn LLVMRustMetadataAsValue < ' a > ( C : & ' a Context , MD : & ' a Metadata ) -> & ' a Value ;
1931
+ pub fn LLVMMetadataAsValue < ' a > ( C : & ' a Context , MD : & ' a Metadata ) -> & ' a Value ;
1924
1932
1925
1933
pub fn LLVMRustDIBuilderCreate ( M : & Module ) -> & mut DIBuilder < ' _ > ;
1926
1934
0 commit comments