diff options
author | Emilio Cobos Álvarez <ecoal95@gmail.com> | 2016-11-15 12:22:31 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <ecoal95@gmail.com> | 2016-11-16 00:46:45 +0100 |
commit | 239d62bbcfeb26aa6c29e95675e1f6907fea4c4b (patch) | |
tree | eb7acfa87af4d6ab4611b782757ad285af2fd5e8 | |
parent | 1003bd0a0f80598f73d30cb3b7811200073f57ef (diff) |
clangll: Add bindings to CXEvalResult
-rw-r--r-- | libbindgen/src/clangll.rs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/libbindgen/src/clangll.rs b/libbindgen/src/clangll.rs index b9743117..98ba525c 100644 --- a/libbindgen/src/clangll.rs +++ b/libbindgen/src/clangll.rs @@ -7,7 +7,22 @@ #![allow(non_upper_case_globals)] #![cfg_attr(rustfmt, rustfmt_skip)] -use ::std::os::raw::{ c_char, c_int, c_long, c_longlong, c_uint, c_ulong, c_ulonglong, c_void}; +use ::std::os::raw::{c_char, c_int, c_long, c_longlong, c_uint, c_ulong, c_ulonglong, c_void}; + +#[cfg(not(feature = "llvm_stable"))] +use std::os::raw::c_double; + + +pub type CXEvalResult = *mut c_void; +pub type Enum_CXEvalResultKind = c_uint; + +pub const CXEval_Int: c_uint = 1; +pub const CXEval_Float: c_uint = 2; +pub const CXEval_ObjCStrLiteral: c_uint = 3; +pub const CXEval_StrLiteral: c_uint = 4; +pub const CXEval_CFStr: c_uint = 5; +pub const CXEval_Other: c_uint = 6; +pub const CXEval_UnExposed: c_uint = 0; pub type ptrdiff_t = c_long; pub type size_t = c_ulong; @@ -1436,4 +1451,10 @@ extern "C" { offset: *mut c_uint); pub fn clang_indexLoc_getCXSourceLocation(loc: CXIdxLoc) -> CXSourceLocation; + pub fn clang_Cursor_Evaluate(C: CXCursor) -> CXEvalResult; + pub fn clang_EvalResult_getKind(E: CXEvalResult) -> Enum_CXEvalResultKind; + pub fn clang_EvalResult_getAsInt(E: CXEvalResult) -> c_int; + pub fn clang_EvalResult_getAsDouble(E: CXEvalResult) -> c_double; + pub fn clang_EvalResult_getAsStr(E: CXEvalResult) -> *const c_char; + pub fn clang_EvalResult_dispose(E: CXEvalResult); } |