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
cllvmhas been internalized to LLVMSwift. The separate repository has been archived and will no longer be maintained.- The
CallingConventionenumeration has drastically expanded - APIs for COMDAT support have been added
- The
IRConstantprotocol has been added, and all global values now conform to it. - The return type of APIs that return constants have been refined to use
IRConstantwhere possible - Constant GEP, sign extension, and bitcasting APIs have been aded
- Restrictions on function attributes have been completely lifted
- Documentation for
ThreadLocalModels has drastically expanded and is much more accurate UnnamedAddressnow supports local unnamed addresses- Routines for adding globals have been moved from
IRBuildertoModulewhere they belong StructTypenow includes accessors for its opacity and whether it was created with bitpacking or not.- The
SizeandAlignmentunit 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
SizeandAlignment. Notably,TargetData's functions that used to take and return integers now take and returnSizeandAlignment. The old forms are now deprecated - The
StructLayoutenum has been ported from LLVM to provide convenient access to the layout ofStructTypes. - Accessors for many more attributes of
TargetMachinehave been added. - The
Targets supported by aTargetMachineare 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!