Skip to content

Commit a4af1f0

Browse files
authored
Add support for LLVM 20. (#512)
1 parent 470e1de commit a4af1f0

26 files changed

+13784
-177
lines changed

.github/workflows/Test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
version: ['1.10', '1.11', '^1.12.0-0', 'nightly']
21+
version: ['1.10', '1.11', '1.12-nightly', 'nightly']
2222
os: ['ubuntu-latest', 'macOS-latest', 'windows-latest']
2323
arch: [x64]
2424
llvm_args: ['']

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ BFloat16sExt = "BFloat16s"
1919
[compat]
2020
BFloat16s = "0.4, 0.5"
2121
CEnum = "0.2, 0.3, 0.4, 0.5"
22-
LLVMExtra_jll = "=0.0.35"
22+
LLVMExtra_jll = "=0.0.36"
2323
Libdl = "1.8"
2424
Preferences = "1.4"
2525
Printf = "1.8"

lib/15/libLLVM.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -840,11 +840,11 @@ end
840840
end
841841

842842
"""
843-
__JL_Ctag_85
843+
##Ctag#230
844844
845845
Attribute index are either LLVMAttributeReturnIndex, LLVMAttributeFunctionIndex or a parameter number from 1 to N.
846846
"""
847-
@cenum __JL_Ctag_85::Int32 begin
847+
@cenum var"##Ctag#230"::Int32 begin
848848
LLVMAttributeReturnIndex = 0
849849
LLVMAttributeFunctionIndex = -1
850850
end
@@ -6534,11 +6534,11 @@ The amount of debug information to emit.
65346534
end
65356535

65366536
"""
6537-
__JL_Ctag_115
6537+
##Ctag#231
65386538
65396539
The kind of metadata nodes.
65406540
"""
6541-
@cenum __JL_Ctag_115::UInt32 begin
6541+
@cenum var"##Ctag#231"::UInt32 begin
65426542
LLVMMDStringMetadataKind = 0
65436543
LLVMConstantAsMetadataMetadataKind = 1
65446544
LLVMLocalAsMetadataMetadataKind = 2

lib/15/libLLVM_extra.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ function LLVMPostDominatorTreeInstructionDominates(Tree, InstA, InstB)
297297
ccall((:LLVMPostDominatorTreeInstructionDominates, libLLVMExtra), LLVMBool, (LLVMPostDominatorTreeRef, LLVMValueRef, LLVMValueRef), Tree, InstA, InstB)
298298
end
299299

300-
@cenum __JL_Ctag_53::UInt32 begin
300+
@cenum __JL_Ctag_2::UInt32 begin
301301
LLVMFastMathAllowReassoc = 1
302302
LLVMFastMathNoNaNs = 2
303303
LLVMFastMathNoInfs = 4

lib/16/libLLVM.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -843,11 +843,11 @@ end
843843
end
844844

845845
"""
846-
__JL_Ctag_85
846+
##Ctag#232
847847
848848
Attribute index are either LLVMAttributeReturnIndex, LLVMAttributeFunctionIndex or a parameter number from 1 to N.
849849
"""
850-
@cenum __JL_Ctag_85::Int32 begin
850+
@cenum var"##Ctag#232"::Int32 begin
851851
LLVMAttributeReturnIndex = 0
852852
LLVMAttributeFunctionIndex = -1
853853
end
@@ -6522,11 +6522,11 @@ The amount of debug information to emit.
65226522
end
65236523

65246524
"""
6525-
__JL_Ctag_115
6525+
##Ctag#233
65266526
65276527
The kind of metadata nodes.
65286528
"""
6529-
@cenum __JL_Ctag_115::UInt32 begin
6529+
@cenum var"##Ctag#233"::UInt32 begin
65306530
LLVMMDStringMetadataKind = 0
65316531
LLVMConstantAsMetadataMetadataKind = 1
65326532
LLVMLocalAsMetadataMetadataKind = 2

lib/16/libLLVM_extra.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ function LLVMPostDominatorTreeInstructionDominates(Tree, InstA, InstB)
297297
ccall((:LLVMPostDominatorTreeInstructionDominates, libLLVMExtra), LLVMBool, (LLVMPostDominatorTreeRef, LLVMValueRef, LLVMValueRef), Tree, InstA, InstB)
298298
end
299299

300-
@cenum __JL_Ctag_53::UInt32 begin
300+
@cenum __JL_Ctag_2::UInt32 begin
301301
LLVMFastMathAllowReassoc = 1
302302
LLVMFastMathNoNaNs = 2
303303
LLVMFastMathNoInfs = 4

lib/17/libLLVM.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -841,11 +841,11 @@ end
841841
end
842842

843843
"""
844-
__JL_Ctag_85
844+
##Ctag#234
845845
846846
Attribute index are either LLVMAttributeReturnIndex, LLVMAttributeFunctionIndex or a parameter number from 1 to N.
847847
"""
848-
@cenum __JL_Ctag_85::Int32 begin
848+
@cenum var"##Ctag#234"::Int32 begin
849849
LLVMAttributeReturnIndex = 0
850850
LLVMAttributeFunctionIndex = -1
851851
end
@@ -6568,11 +6568,11 @@ The amount of debug information to emit.
65686568
end
65696569

65706570
"""
6571-
__JL_Ctag_115
6571+
##Ctag#235
65726572
65736573
The kind of metadata nodes.
65746574
"""
6575-
@cenum __JL_Ctag_115::UInt32 begin
6575+
@cenum var"##Ctag#235"::UInt32 begin
65766576
LLVMMDStringMetadataKind = 0
65776577
LLVMConstantAsMetadataMetadataKind = 1
65786578
LLVMLocalAsMetadataMetadataKind = 2

lib/17/libLLVM_extra.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ function LLVMPostDominatorTreeInstructionDominates(Tree, InstA, InstB)
257257
ccall((:LLVMPostDominatorTreeInstructionDominates, libLLVMExtra), LLVMBool, (LLVMPostDominatorTreeRef, LLVMValueRef, LLVMValueRef), Tree, InstA, InstB)
258258
end
259259

260-
@cenum __JL_Ctag_53::UInt32 begin
260+
@cenum __JL_Ctag_2::UInt32 begin
261261
LLVMFastMathAllowReassoc = 1
262262
LLVMFastMathNoNaNs = 2
263263
LLVMFastMathNoInfs = 4

lib/18/libLLVM.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -848,11 +848,11 @@ end
848848
end
849849

850850
"""
851-
__JL_Ctag_85
851+
##Ctag#236
852852
853853
Attribute index are either LLVMAttributeReturnIndex, LLVMAttributeFunctionIndex or a parameter number from 1 to N.
854854
"""
855-
@cenum __JL_Ctag_85::Int32 begin
855+
@cenum var"##Ctag#236"::Int32 begin
856856
LLVMAttributeReturnIndex = 0
857857
LLVMAttributeFunctionIndex = -1
858858
end
@@ -876,7 +876,7 @@ end
876876

877877
const LLVMAttributeIndex = Cuint
878878

879-
@cenum __JL_Ctag_87::UInt32 begin
879+
@cenum var"##Ctag#237"::UInt32 begin
880880
LLVMFastMathAllowReassoc = 1
881881
LLVMFastMathNoNaNs = 2
882882
LLVMFastMathNoInfs = 4
@@ -6827,11 +6827,11 @@ The amount of debug information to emit.
68276827
end
68286828

68296829
"""
6830-
__JL_Ctag_117
6830+
##Ctag#238
68316831
68326832
The kind of metadata nodes.
68336833
"""
6834-
@cenum __JL_Ctag_117::UInt32 begin
6834+
@cenum var"##Ctag#238"::UInt32 begin
68356835
LLVMMDStringMetadataKind = 0
68366836
LLVMConstantAsMetadataMetadataKind = 1
68376837
LLVMLocalAsMetadataMetadataKind = 2
@@ -10277,16 +10277,16 @@ function LLVMOrcCreateDynamicLibrarySearchGeneratorForPath(Result, FileName, Glo
1027710277
end
1027810278

1027910279
"""
10280-
LLVMOrcCreateStaticLibrarySearchGeneratorForPath(Result, ObjLayer, FileName, TargetTriple)
10280+
LLVMOrcCreateStaticLibrarySearchGeneratorForPath(Result, ObjLayer, FileName)
1028110281
1028210282
Get a [`LLVMOrcCreateStaticLibrarySearchGeneratorForPath`](@ref) that will reflect static library symbols into the JITDylib. On success the resulting generator is owned by the client. Ownership is typically transferred by adding the instance to a JITDylib using [`LLVMOrcJITDylibAddGenerator`](@ref),
1028310283
1028410284
Call with the optional TargetTriple argument will succeed if the file at the given path is a static library or a MachO universal binary containing a static library that is compatible with the given triple. Otherwise it will return an error.
1028510285
1028610286
THIS API IS EXPERIMENTAL AND LIKELY TO CHANGE IN THE NEAR FUTURE!
1028710287
"""
10288-
function LLVMOrcCreateStaticLibrarySearchGeneratorForPath(Result, ObjLayer, FileName, TargetTriple)
10289-
ccall((:LLVMOrcCreateStaticLibrarySearchGeneratorForPath, libllvm), LLVMErrorRef, (Ptr{LLVMOrcDefinitionGeneratorRef}, LLVMOrcObjectLayerRef, Cstring, Cstring), Result, ObjLayer, FileName, TargetTriple)
10288+
function LLVMOrcCreateStaticLibrarySearchGeneratorForPath(Result, ObjLayer, FileName)
10289+
ccall((:LLVMOrcCreateStaticLibrarySearchGeneratorForPath, libllvm), LLVMErrorRef, (Ptr{LLVMOrcDefinitionGeneratorRef}, LLVMOrcObjectLayerRef, Cstring), Result, ObjLayer, FileName)
1029010290
end
1029110291

1029210292
"""

lib/19/libLLVM.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -855,11 +855,11 @@ end
855855
end
856856

857857
"""
858-
__JL_Ctag_1
858+
##Ctag#239
859859
860860
Attribute index are either LLVMAttributeReturnIndex, LLVMAttributeFunctionIndex or a parameter number from 1 to N.
861861
"""
862-
@cenum __JL_Ctag_1::Int32 begin
862+
@cenum var"##Ctag#239"::Int32 begin
863863
LLVMAttributeReturnIndex = 0
864864
LLVMAttributeFunctionIndex = -1
865865
end
@@ -883,7 +883,7 @@ CallInst::TailCallKind
883883
LLVMTailCallKindNoTail = 3
884884
end
885885

886-
@cenum __JL_Ctag_2::UInt32 begin
886+
@cenum var"##Ctag#240"::UInt32 begin
887887
LLVMFastMathAllowReassoc = 1
888888
LLVMFastMathNoNaNs = 2
889889
LLVMFastMathNoInfs = 4
@@ -902,7 +902,7 @@ See https://llvm.org/docs/LangRef.html#fast-math-flags
902902
"""
903903
const LLVMFastMathFlags = Cuint
904904

905-
@cenum __JL_Ctag_3::UInt32 begin
905+
@cenum var"##Ctag#241"::UInt32 begin
906906
LLVMGEPFlagInBounds = 1
907907
LLVMGEPFlagNUSW = 2
908908
LLVMGEPFlagNUW = 4
@@ -7226,11 +7226,11 @@ The amount of debug information to emit.
72267226
end
72277227

72287228
"""
7229-
__JL_Ctag_4
7229+
##Ctag#242
72307230
72317231
The kind of metadata nodes.
72327232
"""
7233-
@cenum __JL_Ctag_4::UInt32 begin
7233+
@cenum var"##Ctag#242"::UInt32 begin
72347234
LLVMMDStringMetadataKind = 0
72357235
LLVMConstantAsMetadataMetadataKind = 1
72367236
LLVMLocalAsMetadataMetadataKind = 2
@@ -10685,16 +10685,16 @@ function LLVMOrcCreateDynamicLibrarySearchGeneratorForPath(Result, FileName, Glo
1068510685
end
1068610686

1068710687
"""
10688-
LLVMOrcCreateStaticLibrarySearchGeneratorForPath(Result, ObjLayer, FileName, TargetTriple)
10688+
LLVMOrcCreateStaticLibrarySearchGeneratorForPath(Result, ObjLayer, FileName)
1068910689
1069010690
Get a [`LLVMOrcCreateStaticLibrarySearchGeneratorForPath`](@ref) that will reflect static library symbols into the JITDylib. On success the resulting generator is owned by the client. Ownership is typically transferred by adding the instance to a JITDylib using [`LLVMOrcJITDylibAddGenerator`](@ref),
1069110691
1069210692
Call with the optional TargetTriple argument will succeed if the file at the given path is a static library or a MachO universal binary containing a static library that is compatible with the given triple. Otherwise it will return an error.
1069310693
1069410694
THIS API IS EXPERIMENTAL AND LIKELY TO CHANGE IN THE NEAR FUTURE!
1069510695
"""
10696-
function LLVMOrcCreateStaticLibrarySearchGeneratorForPath(Result, ObjLayer, FileName, TargetTriple)
10697-
ccall((:LLVMOrcCreateStaticLibrarySearchGeneratorForPath, libllvm), LLVMErrorRef, (Ptr{LLVMOrcDefinitionGeneratorRef}, LLVMOrcObjectLayerRef, Cstring, Cstring), Result, ObjLayer, FileName, TargetTriple)
10696+
function LLVMOrcCreateStaticLibrarySearchGeneratorForPath(Result, ObjLayer, FileName)
10697+
ccall((:LLVMOrcCreateStaticLibrarySearchGeneratorForPath, libllvm), LLVMErrorRef, (Ptr{LLVMOrcDefinitionGeneratorRef}, LLVMOrcObjectLayerRef, Cstring), Result, ObjLayer, FileName)
1069810698
end
1069910699

1070010700
"""

0 commit comments

Comments
 (0)