Use LLVMDIBuilderCreateLexicalBlockFile
This commit is contained in:
parent
70d41bc711
commit
949b4673ce
3 changed files with 17 additions and 16 deletions
|
@ -1641,7 +1641,14 @@ pub(crate) fn extend_scope_to_file<'ll>(
|
||||||
file: &SourceFile,
|
file: &SourceFile,
|
||||||
) -> &'ll DILexicalBlock {
|
) -> &'ll DILexicalBlock {
|
||||||
let file_metadata = file_metadata(cx, file);
|
let file_metadata = file_metadata(cx, file);
|
||||||
unsafe { llvm::LLVMRustDIBuilderCreateLexicalBlockFile(DIB(cx), scope_metadata, file_metadata) }
|
unsafe {
|
||||||
|
llvm::LLVMDIBuilderCreateLexicalBlockFile(
|
||||||
|
DIB(cx),
|
||||||
|
scope_metadata,
|
||||||
|
file_metadata,
|
||||||
|
/* Discriminator (default) */ 0u32,
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn tuple_field_name(field_index: usize) -> Cow<'static, str> {
|
fn tuple_field_name(field_index: usize) -> Cow<'static, str> {
|
||||||
|
|
|
@ -13,9 +13,8 @@ use rustc_target::spec::SymbolVisibility;
|
||||||
use super::RustString;
|
use super::RustString;
|
||||||
use super::debuginfo::{
|
use super::debuginfo::{
|
||||||
DIArray, DIBasicType, DIBuilder, DICompositeType, DIDerivedType, DIDescriptor, DIEnumerator,
|
DIArray, DIBasicType, DIBuilder, DICompositeType, DIDerivedType, DIDescriptor, DIEnumerator,
|
||||||
DIFile, DIFlags, DIGlobalVariableExpression, DILexicalBlock, DILocation, DISPFlags, DIScope,
|
DIFile, DIFlags, DIGlobalVariableExpression, DILocation, DISPFlags, DIScope, DISubprogram,
|
||||||
DISubprogram, DISubrange, DITemplateTypeParameter, DIType, DIVariable, DebugEmissionKind,
|
DISubrange, DITemplateTypeParameter, DIType, DIVariable, DebugEmissionKind, DebugNameTableKind,
|
||||||
DebugNameTableKind,
|
|
||||||
};
|
};
|
||||||
use crate::llvm;
|
use crate::llvm;
|
||||||
|
|
||||||
|
@ -1734,6 +1733,13 @@ unsafe extern "C" {
|
||||||
Line: c_uint,
|
Line: c_uint,
|
||||||
Column: c_uint,
|
Column: c_uint,
|
||||||
) -> &'ll Metadata;
|
) -> &'ll Metadata;
|
||||||
|
|
||||||
|
pub(crate) fn LLVMDIBuilderCreateLexicalBlockFile<'ll>(
|
||||||
|
Builder: &DIBuilder<'ll>,
|
||||||
|
Scope: &'ll Metadata,
|
||||||
|
File: &'ll Metadata,
|
||||||
|
Discriminator: c_uint, // (optional "DWARF path discriminator"; default is 0)
|
||||||
|
) -> &'ll Metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[link(name = "llvm-wrapper", kind = "static")]
|
#[link(name = "llvm-wrapper", kind = "static")]
|
||||||
|
@ -2165,12 +2171,6 @@ unsafe extern "C" {
|
||||||
Type: &'a DIType,
|
Type: &'a DIType,
|
||||||
) -> &'a DIDerivedType;
|
) -> &'a DIDerivedType;
|
||||||
|
|
||||||
pub fn LLVMRustDIBuilderCreateLexicalBlockFile<'a>(
|
|
||||||
Builder: &DIBuilder<'a>,
|
|
||||||
Scope: &'a DIScope,
|
|
||||||
File: &'a DIFile,
|
|
||||||
) -> &'a DILexicalBlock;
|
|
||||||
|
|
||||||
pub fn LLVMRustDIBuilderCreateStaticVariable<'a>(
|
pub fn LLVMRustDIBuilderCreateStaticVariable<'a>(
|
||||||
Builder: &DIBuilder<'a>,
|
Builder: &DIBuilder<'a>,
|
||||||
Context: Option<&'a DIScope>,
|
Context: Option<&'a DIScope>,
|
||||||
|
|
|
@ -1179,12 +1179,6 @@ LLVMRustDIBuilderCreateQualifiedType(LLVMDIBuilderRef Builder, unsigned Tag,
|
||||||
unwrap(Builder)->createQualifiedType(Tag, unwrapDI<DIType>(Type)));
|
unwrap(Builder)->createQualifiedType(Tag, unwrapDI<DIType>(Type)));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateLexicalBlockFile(
|
|
||||||
LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef File) {
|
|
||||||
return wrap(unwrap(Builder)->createLexicalBlockFile(
|
|
||||||
unwrapDI<DIDescriptor>(Scope), unwrapDI<DIFile>(File)));
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateStaticVariable(
|
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateStaticVariable(
|
||||||
LLVMDIBuilderRef Builder, LLVMMetadataRef Context, const char *Name,
|
LLVMDIBuilderRef Builder, LLVMMetadataRef Context, const char *Name,
|
||||||
size_t NameLen, const char *LinkageName, size_t LinkageNameLen,
|
size_t NameLen, const char *LinkageName, size_t LinkageNameLen,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue