Skip to content

Commit 23259ef

Browse files
committed
Update to LLVM 6.0
1 parent adc94d2 commit 23259ef

File tree

3 files changed

+25
-15
lines changed

3 files changed

+25
-15
lines changed

.travis.yml

Lines changed: 23 additions & 13 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: xcode9
8+
osx_image: xcode9.2
99
before_install:
1010
- export PATH=/usr/local/opt/llvm/bin:"${PATH}"
1111
- brew update
@@ -18,26 +18,36 @@ matrix:
1818
sudo: required
1919
dist: trusty
2020
env:
21-
- LLVM_API_VERSION=5.0
22-
before_install:
21+
- LLVM_API_VERSION=6.0
22+
addons:
23+
apt:
24+
sources:
25+
- ubuntu-toolchain-r-test
26+
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-6.0 main'
27+
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
28+
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main'
29+
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
30+
packages:
31+
- llvm-6.0
32+
- libc++1
33+
34+
script:
2335
- export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:"${PKG_CONFIG_PATH}"
24-
- wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
25-
- sudo apt-add-repository "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-${LLVM_API_VERSION}
26-
main"
27-
- sudo apt-get update
28-
- sudo apt-get install llvm-${LLVM_API_VERSION} libc++1
2936
- sudo cp /usr/lib/x86_64-linux-gnu/libc++.so.1.0 /usr/lib/
3037
- sudo ln -sf /usr/lib/libc++.so.1.0 /usr/lib/libc++.so
3138
- sudo rm -rf /usr/local/clang-*/bin/llvm-config
3239
- ls -l /usr/bin/llvm-config*
3340
- sudo rm -f /usr/bin/llvm-config
3441
- sudo ln -s /usr/bin/llvm-config-${LLVM_API_VERSION} /usr/bin/llvm-config
3542
- wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
36-
- wget https://swift.org/builds/swift-4.0-release/ubuntu1404/swift-4.0-RELEASE/swift-4.0-RELEASE-ubuntu14.04.tar.gz
37-
- tar xzf swift-4.0-RELEASE-ubuntu14.04.tar.gz
38-
- export PATH=${PWD}/swift-4.0-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
39-
- sudo ./swift-4.0-RELEASE-ubuntu14.04/usr/bin/swift utils/make-pkgconfig.swift
40-
script:
43+
- wget https://swift.org/builds/swift-4.0.3-release/ubuntu1404/swift-4.0.3-RELEASE/swift-4.0.3-RELEASE-ubuntu14.04.tar.gz
44+
- tar -xzf swift-4.0.3-RELEASE-ubuntu14.04.tar.gz
45+
- export PATH=$PATH:$(pwd)/swift-4.0.3-RELEASE-ubuntu14.04/usr/bin
46+
- sudo apt-get remove llvm-6.0
47+
- sudo apt autoremove
48+
- sudo apt-get install llvm-5.0
49+
- sudo $(pwd)/swift-4.0.3-RELEASE-ubuntu14.04/usr/bin/swift utils/make-pkgconfig.swift
50+
- swift build
4151
- swift test
4252
notifications:
4353
slack:

Sources/LLVM/MetadataType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ public struct MetadataType: IRType {
1818

1919
/// Retrieves the underlying LLVM type object.
2020
public func asLLVM() -> LLVMTypeRef {
21-
fatalError("This version of LLVM does not support the creation of MetadataType objects")
21+
return LLVMMetadataTypeInContext(context.llvm)
2222
}
2323
}

Sources/LLVM/TokenType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ public struct TokenType: IRType {
1919

2020
/// Retrieves the underlying LLVM type object.
2121
public func asLLVM() -> LLVMTypeRef {
22-
fatalError("This version of LLVM does not support the creation of TokenType objects")
22+
return LLVMTokenTypeInContext(context.llvm)
2323
}
2424
}

0 commit comments

Comments
 (0)