0.4.0
LLVMSwift now tracks LLVM 7.0
In addition to breaking a lot of APIs, our upgrade path to LLVM 7.0 coincides with the first removals of deprecated APIs in LLVMSwift. Without further ado
- LLVMSwift now supports Swift 4.2 and the Swift 4.2 tooling and package manager
cllvm
has been internalized to LLVMSwift. The separate repository has been archived and will no longer be maintained.- The
CallingConvention
enumeration has drastically expanded - APIs for COMDAT support have been added
- The
IRConstant
protocol has been added, and all global values now conform to it. - The return type of APIs that return constants have been refined to use
IRConstant
where possible - Constant GEP, sign extension, and bitcasting APIs have been aded
- Restrictions on function attributes have been completely lifted
- Documentation for
ThreadLocalModel
s has drastically expanded and is much more accurate UnnamedAddress
now supports local unnamed addresses- Routines for adding globals have been moved from
IRBuilder
toModule
where they belong StructType
now includes accessors for its opacity and whether it was created with bitpacking or not.- The
Size
andAlignment
unit values have been added. Like clang'sCharUnits
, they prevent bugs with mixed-unit arithmetic and make it convenient to work with byte-level calculations. - APIs that used to take and return integers now speak in terms of
Size
andAlignment
. Notably,TargetData
's functions that used to take and return integers now take and returnSize
andAlignment
. The old forms are now deprecated - The
StructLayout
enum has been ported from LLVM to provide convenient access to the layout ofStructType
s. - Accessors for many more attributes of
TargetMachine
have been added. - The
Target
s supported by aTargetMachine
are now enumerable.
ORCJIT
LLVMSwift has migrated JIT
to ORCJIT this release. To do so, we have completely removed and rewritten the old API. The ORCJIT will continue to evolve and stabilize over the next several LLVM releases.
Debug Information
Last but not least, LLVMSwift now includes a nearly feature-complete implementation of LLVM's debug information APIs. It's been a long time coming, but creating and attaching metadata to IRValues is now a reality!