diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/clang.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/clang.rs b/src/clang.rs index 86eccd0c..a2b4ee0f 100644 --- a/src/clang.rs +++ b/src/clang.rs @@ -69,7 +69,11 @@ impl Cursor { /// Get the mangled name of this cursor's referent. pub fn mangling(&self) -> String { - unsafe { cxstring_into_string(clang_Cursor_getMangling(self.x)) } + if clang_Cursor_getMangling::is_loaded() { + unsafe { cxstring_into_string(clang_Cursor_getMangling(self.x)) } + } else { + self.spelling() + } } /// Get the `Cursor` for this cursor's referent's lexical parent. |