Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ matrix:
include:
- os: osx
language: objective-c
osx_image: xcode8.2
osx_image: xcode8.3
before_install:
- export PATH=/usr/local/opt/llvm/bin:"${PATH}"
- brew update
Expand Down Expand Up @@ -33,10 +33,10 @@ matrix:
- sudo rm -f /usr/bin/llvm-config
- sudo ln -s /usr/bin/llvm-config-${LLVM_API_VERSION} /usr/bin/llvm-config
- wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
- wget https://swift.org/builds/swift-3.0.2-release/ubuntu1404/swift-3.0.2-RELEASE/swift-3.0.2-RELEASE-ubuntu14.04.tar.gz
- tar xzf swift-3.0.2-RELEASE-ubuntu14.04.tar.gz
- export PATH=${PWD}/swift-3.0.2-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
- sudo ./swift-3.0.2-RELEASE-ubuntu14.04/usr/bin/swift utils/make-pkgconfig.swift
- wget https://swift.org/builds/swift-3.1-release/ubuntu1404/swift-3.1-RELEASE/swift-3.1-RELEASE-ubuntu14.04.tar.gz
- tar xzf swift-3.1-RELEASE-ubuntu14.04.tar.gz
- export PATH=${PWD}/swift-3.1-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
- sudo ./swift-3.1-RELEASE-ubuntu14.04/usr/bin/swift utils/make-pkgconfig.swift
script:
- swift test
notifications:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Plus, it provides common wrappers around oft-used types like `Function`, `Global
There are a couple, annoying steps you need to get it working before it'll
build.

- Install LLVM 3.9 using your favorite package manager. For example:
- Install LLVM 4.0 using your favorite package manager. For example:
- `brew install llvm`
- Ensure `llvm-config` is in your `PATH`
- That will reside in the `/bin` folder wherever your package manager
Expand Down
2 changes: 1 addition & 1 deletion Sources/LLVM/BasicBlock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public struct BasicBlock: IRValue {

/// Deletes the basic block from its containing function.
/// - note: This does not remove breaks to this block from the
/// function. Ensure you have removed all insructions that reference
/// function. Ensure you have removed all instructions that reference
/// this basic block before deleting it.
public func delete() {
LLVMDeleteBasicBlock(llvm)
Expand Down
16 changes: 8 additions & 8 deletions Sources/LLVM/Constant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ public enum Signed: IntegralConstantRepresentation {}
/// Represents floating types and operations.
public enum Floating: ConstantRepresentation {}

// FIXME: When upgrading to Swift 3.1, move this into `Constant`.
internal enum InternalConstantRepresentation {
case unsigned
case signed
case floating
}

/// A `Constant` represents a value initialized to a constant. Constant values
/// may be manipulated with standard Swift arithmetic operations and used with
/// standard IR Builder instructions like any other operand. The difference
Expand All @@ -31,8 +24,15 @@ internal enum InternalConstantRepresentation {
/// disallow mixed-type arithmetic. Use the `cast` family of operations to
/// safely convert constants to other representations.
public struct Constant<Repr: ConstantRepresentation>: IRValue {
fileprivate enum Representation {
case unsigned
case signed
case floating
}
fileprivate let repr: Representation

internal let llvm: LLVMValueRef
internal let repr: InternalConstantRepresentation

internal init(llvm: LLVMValueRef!) {
self.llvm = llvm

Expand Down
2 changes: 1 addition & 1 deletion Sources/LLVM/Function.swift
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public class Function: IRGlobal {

/// Deletes the function from its containing module.
/// - note: This does not remove calls to this function from the
/// module. Ensure you have removed all insructions that reference
/// module. Ensure you have removed all instructions that reference
/// this function before deleting it.
public func delete() {
LLVMDeleteFunction(llvm)
Expand Down
2 changes: 1 addition & 1 deletion Sources/LLVM/Global.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public struct Global: IRGlobal {

/// Deletes the global variable from its containing module.
/// - note: This does not remove references to this global from the
/// module. Ensure you have removed all insructions that reference
/// module. Ensure you have removed all instructions that reference
/// this global before deleting it.
public func delete() {
LLVMDeleteGlobal(llvm)
Expand Down
2 changes: 0 additions & 2 deletions Tests/LLVMTests/FileCheck.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import Foundation

#if os(Linux)
import Glibc

typealias NSRegularExpression = RegularExpression
#else
import Darwin
#endif
Expand Down
1 change: 0 additions & 1 deletion utils/make-pkgconfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import Foundation

#if os(Linux)
typealias Process = Task
let libCPP = "-L/usr/lib -lc++"
#elseif os(macOS)
let libCPP = "-lc++"
Expand Down