@@ -19,15 +19,16 @@ use std::ptr;
19
19
20
20
use bitflags:: bitflags;
21
21
use libc:: { c_char, c_int, c_uchar, c_uint, c_ulonglong, c_void, size_t} ;
22
+ use rustc_llvm:: RustString ;
22
23
23
- use super :: RustString ;
24
- use super :: debuginfo:: {
24
+ use self :: debuginfo:: {
25
25
DIArray , DIBuilder , DIDerivedType , DIDescriptor , DIEnumerator , DIFile , DIFlags ,
26
26
DIGlobalVariableExpression , DILocation , DISPFlags , DIScope , DISubprogram ,
27
27
DITemplateTypeParameter , DIType , DebugEmissionKind , DebugNameTableKind ,
28
28
} ;
29
+ use crate :: TryFromU32 ;
30
+ use crate :: coverageinfo:: coverage_ffi;
29
31
use crate :: llvm:: MetadataKindId ;
30
- use crate :: { TryFromU32 , llvm} ;
31
32
32
33
/// In the LLVM-C API, boolean values are passed as `typedef int LLVMBool`,
33
34
/// which has a different ABI from Rust or C++ `bool`.
@@ -75,13 +76,13 @@ impl Debug for Bool {
75
76
/// Being able to write `b.to_llvm_bool()` is less noisy than `llvm::Bool::from(b)`,
76
77
/// while being more explicit and less mistake-prone than something like `b.into()`.
77
78
pub ( crate ) trait ToLlvmBool : Copy {
78
- fn to_llvm_bool ( self ) -> llvm :: Bool ;
79
+ fn to_llvm_bool ( self ) -> Bool ;
79
80
}
80
81
81
82
impl ToLlvmBool for bool {
82
83
#[ inline( always) ]
83
- fn to_llvm_bool ( self ) -> llvm :: Bool {
84
- llvm :: Bool :: from_bool ( self )
84
+ fn to_llvm_bool ( self ) -> Bool {
85
+ Bool :: from_bool ( self )
85
86
}
86
87
}
87
88
@@ -882,10 +883,10 @@ unsafe extern "C" {
882
883
AsmStringSize : size_t ,
883
884
Constraints : * const c_uchar , // See "PTR_LEN_STR".
884
885
ConstraintsSize : size_t ,
885
- HasSideEffects : llvm :: Bool ,
886
- IsAlignStack : llvm :: Bool ,
886
+ HasSideEffects : Bool ,
887
+ IsAlignStack : Bool ,
887
888
Dialect : AsmDialect ,
888
- CanThrow : llvm :: Bool ,
889
+ CanThrow : Bool ,
889
890
) -> & ' ll Value ;
890
891
891
892
pub ( crate ) safe fn LLVMGetTypeKind ( Ty : & Type ) -> RawEnum < TypeKind > ;
@@ -1655,7 +1656,7 @@ unsafe extern "C" {
1655
1656
ParentScope : Option < & ' ll Metadata > ,
1656
1657
Name : * const c_uchar , // See "PTR_LEN_STR".
1657
1658
NameLen : size_t ,
1658
- ExportSymbols : llvm :: Bool ,
1659
+ ExportSymbols : Bool ,
1659
1660
) -> & ' ll Metadata ;
1660
1661
1661
1662
pub ( crate ) fn LLVMDIBuilderCreateLexicalBlock < ' ll > (
@@ -1843,7 +1844,7 @@ unsafe extern "C" {
1843
1844
File : & ' ll Metadata ,
1844
1845
LineNo : c_uint ,
1845
1846
Ty : & ' ll Metadata ,
1846
- AlwaysPreserve : llvm :: Bool , // "If true, this descriptor will survive optimizations."
1847
+ AlwaysPreserve : Bool , // "If true, this descriptor will survive optimizations."
1847
1848
Flags : DIFlags ,
1848
1849
AlignInBits : u32 ,
1849
1850
) -> & ' ll Metadata ;
@@ -1857,7 +1858,7 @@ unsafe extern "C" {
1857
1858
File : & ' ll Metadata ,
1858
1859
LineNo : c_uint ,
1859
1860
Ty : & ' ll Metadata ,
1860
- AlwaysPreserve : llvm :: Bool , // "If true, this descriptor will survive optimizations."
1861
+ AlwaysPreserve : Bool , // "If true, this descriptor will survive optimizations."
1861
1862
Flags : DIFlags ,
1862
1863
) -> & ' ll Metadata ;
1863
1864
}
@@ -2084,13 +2085,13 @@ unsafe extern "C" {
2084
2085
pub ( crate ) fn LLVMRustCoverageWriteFunctionMappingsToBuffer (
2085
2086
VirtualFileMappingIDs : * const c_uint ,
2086
2087
NumVirtualFileMappingIDs : size_t ,
2087
- Expressions : * const crate :: coverageinfo :: ffi :: CounterExpression ,
2088
+ Expressions : * const coverage_ffi :: CounterExpression ,
2088
2089
NumExpressions : size_t ,
2089
- CodeRegions : * const crate :: coverageinfo :: ffi :: CodeRegion ,
2090
+ CodeRegions : * const coverage_ffi :: CodeRegion ,
2090
2091
NumCodeRegions : size_t ,
2091
- ExpansionRegions : * const crate :: coverageinfo :: ffi :: ExpansionRegion ,
2092
+ ExpansionRegions : * const coverage_ffi :: ExpansionRegion ,
2092
2093
NumExpansionRegions : size_t ,
2093
- BranchRegions : * const crate :: coverageinfo :: ffi :: BranchRegion ,
2094
+ BranchRegions : * const coverage_ffi :: BranchRegion ,
2094
2095
NumBranchRegions : size_t ,
2095
2096
BufferOut : & RustString ,
2096
2097
) ;
0 commit comments