Skip to content

Commit 85ae342

Browse files
committed
Update to Swift 3.1
1 parent f8b4743 commit 85ae342

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ matrix:
55
include:
66
- os: osx
77
language: objective-c
8-
osx_image: xcode8.2
8+
osx_image: xcode8.3
99
before_install:
1010
- export PATH=/usr/local/opt/llvm/bin:"${PATH}"
1111
- brew update
@@ -33,10 +33,10 @@ matrix:
3333
- sudo rm -f /usr/bin/llvm-config
3434
- sudo ln -s /usr/bin/llvm-config-${LLVM_API_VERSION} /usr/bin/llvm-config
3535
- wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
36-
- 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
37-
- tar xzf swift-3.0.2-RELEASE-ubuntu14.04.tar.gz
38-
- export PATH=${PWD}/swift-3.0.2-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
39-
- sudo ./swift-3.0.2-RELEASE-ubuntu14.04/usr/bin/swift utils/make-pkgconfig.swift
36+
- wget https://swift.org/builds/swift-3.1-release/ubuntu1404/swift-3.1-RELEASE/swift-3.1-RELEASE-ubuntu14.04.tar.gz
37+
- tar xzf swift-3.1-RELEASE-ubuntu14.04.tar.gz
38+
- export PATH=${PWD}/swift-3.1-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
39+
- sudo ./swift-3.1-RELEASE-ubuntu14.04/usr/bin/swift utils/make-pkgconfig.swift
4040
script:
4141
- swift test
4242
notifications:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Plus, it provides common wrappers around oft-used types like `Function`, `Global
4747
There are a couple, annoying steps you need to get it working before it'll
4848
build.
4949

50-
- Install LLVM 3.9 using your favorite package manager. For example:
50+
- Install LLVM 4.0 using your favorite package manager. For example:
5151
- `brew install llvm`
5252
- Ensure `llvm-config` is in your `PATH`
5353
- That will reside in the `/bin` folder wherever your package manager

Sources/LLVM/Constant.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ public enum Signed: IntegralConstantRepresentation {}
1414
/// Represents floating types and operations.
1515
public enum Floating: ConstantRepresentation {}
1616

17-
// FIXME: When upgrading to Swift 3.1, move this into `Constant`.
18-
internal enum InternalConstantRepresentation {
19-
case unsigned
20-
case signed
21-
case floating
22-
}
23-
2417
/// A `Constant` represents a value initialized to a constant. Constant values
2518
/// may be manipulated with standard Swift arithmetic operations and used with
2619
/// standard IR Builder instructions like any other operand. The difference
@@ -31,8 +24,15 @@ internal enum InternalConstantRepresentation {
3124
/// disallow mixed-type arithmetic. Use the `cast` family of operations to
3225
/// safely convert constants to other representations.
3326
public struct Constant<Repr: ConstantRepresentation>: IRValue {
27+
fileprivate enum Representation {
28+
case unsigned
29+
case signed
30+
case floating
31+
}
32+
fileprivate let repr: Representation
33+
3434
internal let llvm: LLVMValueRef
35-
internal let repr: InternalConstantRepresentation
35+
3636
internal init(llvm: LLVMValueRef!) {
3737
self.llvm = llvm
3838

0 commit comments

Comments
 (0)