Swift is built on the LLVM Compiler Infrastructure. Swift uses the LLVM Core for code generation and optimization (among other things), Clang for interoperability with C and Objective-C, and LLDB for debugging and the REPL.
Apple maintains a fork of the LLVM Core source repository on GitHub as llvm-project, respectively. This repository track upstreams LLVM development and contains additional changes for Swift. The upstream LLVM repository are merged into the Swift-specific repository frequently. Every attempt is made to minimize the differences between upstream LLVM and the Apple fork to only those changes specifically required for Swift.
Swift follows a policy of making a change in the most upstream repository that is feasible. Contributions to Swift that involve Apple's version of LLVM Project should go directly into the upstream LLVM repository unless they are specific to Swift. For example, an improvement to LLDB's data formatters for a Swift type belongs in the Apple LLVM Project repository, whereas a bug fix to an LLVM optimizer---even if it's only been observed when operating on Swift-generated LLVM IR---belongs in upstream LLVM.
Commits to an upstream LLVM repository are automatically merged
into the appropriate upstream branches in the corresponding Swift
repository (next
in the llvm-project.
Contributions to Swift's LLVM or Clang clones are governed by the LLVM Developer Policy and should follow the appropriate licensing and coding standards. Issues with LLVM code are tracked using the LLVM bug database. For LLDB, changes to files with llvm.org comment headers must go to the upstream LLDB at llvm.org and abide by the LLVM Developer Policy and LLDB coding conventions. Contributions to the Swift-specific parts of LLDB (that is, those with a Swift.org comment header) use the Swift license but still follow the LLDB coding conventions.