Skip to content

Commit 7427017

Browse files
kulpemilio
authored andcommitted
Stop accommodating libclang < 3.8
1 parent 1bfb3ad commit 7427017

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

src/clang.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,10 @@ impl Cursor {
7777
}
7878
}
7979

80-
/// Gets the C++ manglings for this cursor, or an error if the function is
81-
/// not loaded or the manglings are not available.
80+
/// Gets the C++ manglings for this cursor, or an error if the manglings
81+
/// are not available.
8282
pub fn cxx_manglings(&self) -> Result<Vec<String>, ()> {
8383
use clang_sys::*;
84-
if !clang_Cursor_getCXXManglings::is_loaded() {
85-
return Err(());
86-
}
8784
unsafe {
8885
let manglings = clang_Cursor_getCXXManglings(self.x);
8986
if manglings.is_null() {
@@ -592,11 +589,7 @@ impl Cursor {
592589

593590
/// Get the visibility of this cursor's referent.
594591
pub fn visibility(&self) -> CXVisibilityKind {
595-
if clang_getCursorVisibility::is_loaded() {
596-
unsafe { clang_getCursorVisibility(self.x) }
597-
} else {
598-
CXVisibility_Default
599-
}
592+
unsafe { clang_getCursorVisibility(self.x) }
600593
}
601594

602595
/// Given that this cursor's referent is a function, return cursors to its
@@ -641,8 +634,7 @@ impl Cursor {
641634
/// Is this cursor's referent a field declaration that is marked as
642635
/// `mutable`?
643636
pub fn is_mutable_field(&self) -> bool {
644-
clang_CXXField_isMutable::is_loaded() &&
645-
unsafe { clang_CXXField_isMutable(self.x) != 0 }
637+
unsafe { clang_CXXField_isMutable(self.x) != 0 }
646638
}
647639

648640
/// Get the offset of the field represented by the Cursor.

0 commit comments

Comments
 (0)