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.3
osx_image: xcode9
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.1.1-release/ubuntu1404/swift-3.1.1-RELEASE/swift-3.1.1-RELEASE-ubuntu14.04.tar.gz
- tar xzf swift-3.1.1-RELEASE-ubuntu14.04.tar.gz
- export PATH=${PWD}/swift-3.1.1-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
- sudo ./swift-3.1.1-RELEASE-ubuntu14.04/usr/bin/swift utils/make-pkgconfig.swift
- wget https://swift.org/builds/swift-4.0-release/ubuntu1404/swift-4.0-RELEASE/swift-4.0-RELEASE-ubuntu14.04.tar.gz
- tar xzf swift-4.0-RELEASE-ubuntu14.04.tar.gz
- export PATH=${PWD}/swift-4.0-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
- sudo ./swift-4.0-RELEASE-ubuntu14.04/usr/bin/swift utils/make-pkgconfig.swift
script:
- swift test
notifications:
Expand Down
17 changes: 16 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
// swift-tools-version:4.0

import PackageDescription

let package = Package(
name: "LLVM",
products: [
.library(
name: "LLVM",
targets: ["LLVM"]),
],
dependencies: [
.Package(url: "https://github.com/trill-lang/cllvm.git", majorVersion: 0),
.package(url: "https://github.com/trill-lang/cllvm.git", .branch("master")),
.package(url: "https://github.com/trill-lang/FileCheck.git", .branch("master")),
],
targets: [
.target(
name: "LLVM"),
.testTarget(
name: "LLVMTests",
dependencies: ["LLVM", "FileCheck"]),
]
)
4 changes: 2 additions & 2 deletions Sources/LLVM/IntType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public struct IntType: IRType {
/// type's bit width. Defaults to `false`.
public func constant<IntTy: UnsignedInteger>(_ value: IntTy, signExtend: Bool = false) -> Constant<Unsigned> {
return Constant(llvm: LLVMConstInt(asLLVM(),
value.toUIntMax(),
UInt64(value),
signExtend.llvm))
}

Expand All @@ -63,7 +63,7 @@ public struct IntType: IRType {
/// type's bit width. Defaults to `false`.
public func constant<IntTy: SignedInteger>(_ value: IntTy, signExtend: Bool = false) -> Constant<Signed> {
return Constant(llvm: LLVMConstInt(asLLVM(),
UInt64(bitPattern: value.toIntMax()),
UInt64(bitPattern: Int64(value)),
signExtend.llvm))
}

Expand Down
40 changes: 0 additions & 40 deletions Tests/LLVMTests/ANSIColor.swift

This file was deleted.

79 changes: 0 additions & 79 deletions Tests/LLVMTests/ColoredStream.swift

This file was deleted.

1 change: 1 addition & 0 deletions Tests/LLVMTests/ConstantSpec.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import LLVM
import XCTest
import FileCheck
import Foundation

class ConstantSpec : XCTestCase {
Expand Down
1 change: 1 addition & 0 deletions Tests/LLVMTests/FIleCheckSpec.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import LLVM
import XCTest
import FileCheck
import Foundation

class FileCheckSpec : XCTestCase {
Expand Down
Loading