Skip to content

Commit f739f69

Browse files
committed
Fix travis CI allowing to build on llvm stable
1 parent 29af048 commit f739f69

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ before_script:
3838
- echo $LIBCLANG_PATH
3939

4040
script:
41-
- cargo build
42-
- cargo build --verbose
41+
- cargo build --verbose --features llvm_stable
4342
- make test
4443
- git add -A
4544
- git diff-index --quiet HEAD

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ syntex_syntax = "0.32"
1818

1919
[features]
2020
static = []
21+
llvm_stable = []
2122

2223
[lib]
2324
name = "bindgen"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ BINDGEN := ./target/debug/bindgen
99

1010
.PHONY: $(BINDGEN)
1111
$(BINDGEN):
12-
cargo build
12+
[ -f $@ ] || cargo build
1313

1414
.PHONY: test
1515
test: regen-tests

src/clang.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,19 @@ impl Cursor {
135135
}
136136
}
137137

138+
#[cfg(not(feature="llvm_stable"))]
138139
pub fn is_inlined_function(&self) -> bool {
139140
unsafe { clang_Cursor_isFunctionInlined(self.x) != 0 }
140141
}
141142

143+
// TODO: Remove this when LLVM 3.9 is released.
144+
//
145+
// This is currently used for CI purposes.
146+
#[cfg(feature="llvm_stable")]
147+
pub fn is_inlined_function(&self) -> bool {
148+
false
149+
}
150+
142151
// bitfield
143152
pub fn bit_width(&self) -> Option<u32> {
144153
unsafe {

src/clangll.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,7 @@ extern "C" {
11091109
pub fn clang_Type_getTemplateArgumentAsType(T: CXType, i: c_int) ->
11101110
CXType;
11111111
pub fn clang_Cursor_isBitField(C: CXCursor) -> c_uint;
1112+
#[cfg(not(feature="llvm_stable"))]
11121113
pub fn clang_Cursor_isFunctionInlined(C: CXCursor) -> c_uint;
11131114
pub fn clang_isVirtualBase(arg1: CXCursor) -> c_uint;
11141115
pub fn clang_getCXXAccessSpecifier(arg1: CXCursor) ->

0 commit comments

Comments
 (0)