diff options
author | Jack Moffitt <jack@metajack.im> | 2016-06-22 21:01:46 -0600 |
---|---|---|
committer | Ms2ger <Ms2ger@gmail.com> | 2016-07-01 16:30:24 +0200 |
commit | 9309411d608fbb5e09815aaa270dcf4dcbb535dc (patch) | |
tree | 823f99b07727fd143f09de0d171deab43de84a2c /src/clang.rs | |
parent | 7726d5a18a0d7a6ffb3db4350905ce75e1b1e6d3 (diff) |
Add support for elaborated types.
Fixes #1.
Diffstat (limited to 'src/clang.rs')
-rw-r--r-- | src/clang.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/clang.rs b/src/clang.rs index 6233adea..0143c4db 100644 --- a/src/clang.rs +++ b/src/clang.rs @@ -455,6 +455,13 @@ impl Type { clang_getFunctionTypeCallingConv(self.x) } } + + #[cfg(not(feature="llvm_stable"))] + pub fn named(&self) -> Type { + unsafe { + Type { x: clang_Type_getNamedType(self.x) } + } + } } // SourceLocation @@ -955,6 +962,11 @@ pub fn type_to_str(x: Enum_CXTypeKind) -> &'static str { CXType_IncompleteArray => "IncompleteArray", CXType_VariableArray => "VariableArray", CXType_DependentSizedArray => "DependentSizedArray", + CXType_MemberPointer => "MemberPointer", + #[cfg(not(feature="llvm_stable"))] + CXType_Auto => "Auto", + #[cfg(not(feature="llvm_stable"))] + CXType_Elaborated => "Elaborated", _ => "?" } } |