summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-06-28 12:53:19 -0500
committerGitHub <noreply@github.com>2016-06-28 12:53:19 -0500
commit08e7fe4f83ab9f3b03f789cfacb6eccb60cdd182 (patch)
tree9b49456a99cc570a900511bf90e092d72668f162
parent4df6bcb4aadcea79ddd1e427b7a2a1019d4ed368 (diff)
parentf739f6929a17a2f0397228c8b0ac3ed1600d3918 (diff)
Auto merge of #5 - servo:travis, r=nox
travis: try to fix build
-rw-r--r--.travis.yml3
-rw-r--r--Cargo.toml1
-rw-r--r--Makefile2
-rw-r--r--src/clang.rs9
-rw-r--r--src/clangll.rs1
5 files changed, 13 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index b4235983..f54d02ea 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,8 +38,7 @@ before_script:
- echo $LIBCLANG_PATH
script:
- - cargo build
- - cargo build --verbose
+ - cargo build --verbose --features llvm_stable
- make test
- git add -A
- git diff-index --quiet HEAD
diff --git a/Cargo.toml b/Cargo.toml
index c3f31686..0261c19d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,6 +18,7 @@ syntex_syntax = "0.32"
[features]
static = []
+llvm_stable = []
[lib]
name = "bindgen"
diff --git a/Makefile b/Makefile
index be0441c9..853eb195 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ BINDGEN := ./target/debug/bindgen
.PHONY: $(BINDGEN)
$(BINDGEN):
- cargo build
+ [ -f $@ ] || cargo build
.PHONY: test
test: regen-tests
diff --git a/src/clang.rs b/src/clang.rs
index 9c46a94e..6233adea 100644
--- a/src/clang.rs
+++ b/src/clang.rs
@@ -135,10 +135,19 @@ impl Cursor {
}
}
+ #[cfg(not(feature="llvm_stable"))]
pub fn is_inlined_function(&self) -> bool {
unsafe { clang_Cursor_isFunctionInlined(self.x) != 0 }
}
+ // TODO: Remove this when LLVM 3.9 is released.
+ //
+ // This is currently used for CI purposes.
+ #[cfg(feature="llvm_stable")]
+ pub fn is_inlined_function(&self) -> bool {
+ false
+ }
+
// bitfield
pub fn bit_width(&self) -> Option<u32> {
unsafe {
diff --git a/src/clangll.rs b/src/clangll.rs
index 4877ea70..dd836694 100644
--- a/src/clangll.rs
+++ b/src/clangll.rs
@@ -1109,6 +1109,7 @@ extern "C" {
pub fn clang_Type_getTemplateArgumentAsType(T: CXType, i: c_int) ->
CXType;
pub fn clang_Cursor_isBitField(C: CXCursor) -> c_uint;
+ #[cfg(not(feature="llvm_stable"))]
pub fn clang_Cursor_isFunctionInlined(C: CXCursor) -> c_uint;
pub fn clang_isVirtualBase(arg1: CXCursor) -> c_uint;
pub fn clang_getCXXAccessSpecifier(arg1: CXCursor) ->