@@ -5,17 +5,19 @@ use std::fmt::Debug;
55use std:: marker:: PhantomData ;
66use std:: ptr;
77
8- use libc:: { c_char, c_int, c_uint, c_ulonglong, c_void, size_t} ;
8+ use bitflags:: bitflags;
9+ use libc:: { c_char, c_int, c_uchar, c_uint, c_ulonglong, c_void, size_t} ;
910use rustc_macros:: TryFromU32 ;
1011use rustc_target:: spec:: SymbolVisibility ;
1112
1213use super :: RustString ;
1314use super :: debuginfo:: {
1415 DIArray , DIBasicType , DIBuilder , DICompositeType , DIDerivedType , DIDescriptor , DIEnumerator ,
15- DIFile , DIFlags , DIGlobalVariableExpression , DILexicalBlock , DILocation , DINameSpace ,
16- DISPFlags , DIScope , DISubprogram , DISubrange , DITemplateTypeParameter , DIType , DIVariable ,
17- DebugEmissionKind , DebugNameTableKind ,
16+ DIFile , DIFlags , DIGlobalVariableExpression , DILexicalBlock , DILocation , DISPFlags , DIScope ,
17+ DISubprogram , DISubrange , DITemplateTypeParameter , DIType , DIVariable , DebugEmissionKind ,
18+ DebugNameTableKind ,
1819} ;
20+ use crate :: llvm;
1921
2022/// In the LLVM-C API, boolean values are passed as `typedef int LLVMBool`,
2123/// which has a different ABI from Rust or C++ `bool`.
@@ -952,7 +954,6 @@ pub mod debuginfo {
952954 }
953955}
954956
955- use bitflags:: bitflags;
956957// These values **must** match with LLVMRustAllocKindFlags
957958bitflags ! {
958959 #[ repr( transparent) ]
@@ -1717,6 +1718,14 @@ unsafe extern "C" {
17171718 pub ( crate ) fn LLVMDisposeDIBuilder < ' ll > ( Builder : ptr:: NonNull < DIBuilder < ' ll > > ) ;
17181719
17191720 pub ( crate ) fn LLVMDIBuilderFinalize < ' ll > ( Builder : & DIBuilder < ' ll > ) ;
1721+
1722+ pub ( crate ) fn LLVMDIBuilderCreateNameSpace < ' ll > (
1723+ Builder : & DIBuilder < ' ll > ,
1724+ ParentScope : Option < & ' ll Metadata > ,
1725+ Name : * const c_uchar ,
1726+ NameLen : size_t ,
1727+ ExportSymbols : llvm:: Bool ,
1728+ ) -> & ' ll Metadata ;
17201729}
17211730
17221731#[ link( name = "llvm-wrapper" , kind = "static" ) ]
@@ -2286,14 +2295,6 @@ unsafe extern "C" {
22862295 Ty : & ' a DIType ,
22872296 ) -> & ' a DITemplateTypeParameter ;
22882297
2289- pub fn LLVMRustDIBuilderCreateNameSpace < ' a > (
2290- Builder : & DIBuilder < ' a > ,
2291- Scope : Option < & ' a DIScope > ,
2292- Name : * const c_char ,
2293- NameLen : size_t ,
2294- ExportSymbols : bool ,
2295- ) -> & ' a DINameSpace ;
2296-
22972298 pub fn LLVMRustDICompositeTypeReplaceArrays < ' a > (
22982299 Builder : & DIBuilder < ' a > ,
22992300 CompositeType : & ' a DIType ,
0 commit comments