File tree 2 files changed +21
-0
lines changed
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1270,6 +1270,20 @@ pub struct EvalResult {
1270
1270
x : CXEvalResult ,
1271
1271
}
1272
1272
1273
+ #[ cfg( feature = "llvm_stable" ) ]
1274
+ impl EvalResult {
1275
+ pub fn new ( _: Cursor ) -> Self {
1276
+ EvalResult {
1277
+ x : :: std:: ptr:: null_mut ( ) ,
1278
+ }
1279
+ }
1280
+
1281
+ pub fn as_int ( & self ) -> Option < i32 > {
1282
+ None
1283
+ }
1284
+ }
1285
+
1286
+ #[ cfg( not( feature = "llvm_stable" ) ) ]
1273
1287
impl EvalResult {
1274
1288
pub fn new ( cursor : Cursor ) -> Self {
1275
1289
EvalResult {
@@ -1291,6 +1305,7 @@ impl EvalResult {
1291
1305
}
1292
1306
}
1293
1307
1308
+ #[ cfg( not( feature = "llvm_stable" ) ) ]
1294
1309
impl Drop for EvalResult {
1295
1310
fn drop ( & mut self ) {
1296
1311
unsafe { clang_EvalResult_dispose ( self . x ) } ;
Original file line number Diff line number Diff line change @@ -1447,10 +1447,16 @@ extern "C" {
1447
1447
offset : * mut c_uint ) ;
1448
1448
pub fn clang_indexLoc_getCXSourceLocation ( loc : CXIdxLoc ) ->
1449
1449
CXSourceLocation ;
1450
+ #[ cfg( not( feature="llvm_stable" ) ) ]
1450
1451
pub fn clang_Cursor_Evaluate ( C : CXCursor ) -> CXEvalResult ;
1452
+ #[ cfg( not( feature="llvm_stable" ) ) ]
1451
1453
pub fn clang_EvalResult_getKind ( E : CXEvalResult ) -> Enum_CXEvalResultKind ;
1454
+ #[ cfg( not( feature="llvm_stable" ) ) ]
1452
1455
pub fn clang_EvalResult_getAsInt ( E : CXEvalResult ) -> c_int ;
1456
+ #[ cfg( not( feature="llvm_stable" ) ) ]
1453
1457
pub fn clang_EvalResult_getAsDouble ( E : CXEvalResult ) -> c_double ;
1458
+ #[ cfg( not( feature="llvm_stable" ) ) ]
1454
1459
pub fn clang_EvalResult_getAsStr ( E : CXEvalResult ) -> * const c_char ;
1460
+ #[ cfg( not( feature="llvm_stable" ) ) ]
1455
1461
pub fn clang_EvalResult_dispose ( E : CXEvalResult ) ;
1456
1462
}
You can’t perform that action at this time.
0 commit comments