Skip to content

0.4.0

Compare
Choose a tag to compare
@CodaFi CodaFi released this 08 Nov 00:39
fca99fe

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

⚠️ Breaking Changes Ahead ⚠️

  • 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 ThreadLocalModels has drastically expanded and is much more accurate
  • UnnamedAddress now supports local unnamed addresses
  • Routines for adding globals have been moved from IRBuilder to Module where they belong
  • StructType now includes accessors for its opacity and whether it was created with bitpacking or not.
  • The Size and Alignment unit values have been added. Like clang's CharUnits, 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 and Alignment. Notably, TargetData's functions that used to take and return integers now take and return Size and Alignment. The old forms are now deprecated
  • The StructLayout enum has been ported from LLVM to provide convenient access to the layout of StructTypes.
  • Accessors for many more attributes of TargetMachine have been added.
  • The Targets supported by a TargetMachine 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!