File tree Expand file tree Collapse file tree 3 files changed +13
-16
lines changed Expand file tree Collapse file tree 3 files changed +13
-16
lines changed Original file line number Diff line number Diff line change @@ -567,7 +567,8 @@ fn build_variant_struct_wrapper_type_di_node<'ll, 'tcx>(
567
567
let build_assoc_const = |name : & str ,
568
568
type_di_node_ : & ' ll DIType ,
569
569
value : u64 ,
570
- align : Align | unsafe {
570
+ align : Align |
571
+ -> & ' ll llvm:: Metadata {
571
572
// FIXME: Currently we force all DISCR_* values to be u64's as LLDB seems to have
572
573
// problems inspecting other value types. Since DISCR_* is typically only going to be
573
574
// directly inspected via the debugger visualizer - which compares it to the `tag` value
@@ -580,8 +581,9 @@ fn build_variant_struct_wrapper_type_di_node<'ll, 'tcx>(
580
581
} ;
581
582
582
583
// must wrap type in a `const` modifier for LLDB to be able to inspect the value of the member
583
- let field_type =
584
- llvm:: LLVMRustDIBuilderCreateQualifiedType ( DIB ( cx) , DW_TAG_const_type , t_di) ;
584
+ let field_type = unsafe {
585
+ llvm:: LLVMDIBuilderCreateQualifiedType ( DIB ( cx) , DW_TAG_const_type , t_di)
586
+ } ;
585
587
586
588
create_static_member_type (
587
589
cx,
Original file line number Diff line number Diff line change @@ -1970,6 +1970,14 @@ unsafe extern "C" {
1970
1970
ConstantVal : Option < & ' ll Value > ,
1971
1971
AlignInBits : u32 ,
1972
1972
) -> & ' ll Metadata ;
1973
+
1974
+ /// Creates a "qualified type" in the C/C++ sense, by adding modifiers
1975
+ /// like `const` or `volatile`.
1976
+ pub ( crate ) fn LLVMDIBuilderCreateQualifiedType < ' ll > (
1977
+ Builder : & DIBuilder < ' ll > ,
1978
+ Tag : c_uint , // (DWARF tag, e.g. `DW_TAG_const_type`)
1979
+ Type : & ' ll Metadata ,
1980
+ ) -> & ' ll Metadata ;
1973
1981
}
1974
1982
1975
1983
#[ link( name = "llvm-wrapper" , kind = "static" ) ]
@@ -2330,12 +2338,6 @@ unsafe extern "C" {
2330
2338
Ty : & ' a DIType ,
2331
2339
) -> & ' a DIType ;
2332
2340
2333
- pub ( crate ) fn LLVMRustDIBuilderCreateQualifiedType < ' a > (
2334
- Builder : & DIBuilder < ' a > ,
2335
- Tag : c_uint ,
2336
- Type : & ' a DIType ,
2337
- ) -> & ' a DIDerivedType ;
2338
-
2339
2341
pub ( crate ) fn LLVMRustDIBuilderCreateStaticVariable < ' a > (
2340
2342
Builder : & DIBuilder < ' a > ,
2341
2343
Context : Option < & ' a DIScope > ,
Original file line number Diff line number Diff line change @@ -1103,13 +1103,6 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateVariantMemberType(
1103
1103
fromRust (Flags), unwrapDI<DIType>(Ty)));
1104
1104
}
1105
1105
1106
- extern " C" LLVMMetadataRef
1107
- LLVMRustDIBuilderCreateQualifiedType (LLVMDIBuilderRef Builder, unsigned Tag,
1108
- LLVMMetadataRef Type) {
1109
- return wrap (
1110
- unwrap (Builder)->createQualifiedType (Tag, unwrapDI<DIType>(Type)));
1111
- }
1112
-
1113
1106
extern " C" LLVMMetadataRef LLVMRustDIBuilderCreateStaticVariable (
1114
1107
LLVMDIBuilderRef Builder, LLVMMetadataRef Context, const char *Name,
1115
1108
size_t NameLen, const char *LinkageName, size_t LinkageNameLen,
You can’t perform that action at this time.
0 commit comments