Use LLVMDIBuilderFinalize
This commit is contained in:
parent
832fcfb64f
commit
cd2af2dd9a
3 changed files with 3 additions and 7 deletions
|
@ -85,7 +85,7 @@ impl<'ll, 'tcx> CodegenUnitDebugContext<'ll, 'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn finalize(&self, sess: &Session) {
|
pub(crate) fn finalize(&self, sess: &Session) {
|
||||||
unsafe { llvm::LLVMRustDIBuilderFinalize(self.builder.as_ref()) };
|
unsafe { llvm::LLVMDIBuilderFinalize(self.builder.as_ref()) };
|
||||||
|
|
||||||
match sess.target.debuginfo_kind {
|
match sess.target.debuginfo_kind {
|
||||||
DebuginfoKind::Dwarf | DebuginfoKind::DwarfDsym => {
|
DebuginfoKind::Dwarf | DebuginfoKind::DwarfDsym => {
|
||||||
|
|
|
@ -1715,6 +1715,8 @@ unsafe extern "C" {
|
||||||
unsafe extern "C" {
|
unsafe extern "C" {
|
||||||
pub(crate) fn LLVMCreateDIBuilder<'ll>(M: &'ll Module) -> *mut DIBuilder<'ll>;
|
pub(crate) fn LLVMCreateDIBuilder<'ll>(M: &'ll Module) -> *mut DIBuilder<'ll>;
|
||||||
pub(crate) fn LLVMDisposeDIBuilder<'ll>(Builder: ptr::NonNull<DIBuilder<'ll>>);
|
pub(crate) fn LLVMDisposeDIBuilder<'ll>(Builder: ptr::NonNull<DIBuilder<'ll>>);
|
||||||
|
|
||||||
|
pub(crate) fn LLVMDIBuilderFinalize<'ll>(Builder: &DIBuilder<'ll>);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[link(name = "llvm-wrapper", kind = "static")]
|
#[link(name = "llvm-wrapper", kind = "static")]
|
||||||
|
@ -1984,8 +1986,6 @@ unsafe extern "C" {
|
||||||
ValueLen: size_t,
|
ValueLen: size_t,
|
||||||
);
|
);
|
||||||
|
|
||||||
pub fn LLVMRustDIBuilderFinalize(Builder: &DIBuilder<'_>);
|
|
||||||
|
|
||||||
pub fn LLVMRustDIBuilderCreateCompileUnit<'a>(
|
pub fn LLVMRustDIBuilderCreateCompileUnit<'a>(
|
||||||
Builder: &DIBuilder<'a>,
|
Builder: &DIBuilder<'a>,
|
||||||
Lang: c_uint,
|
Lang: c_uint,
|
||||||
|
|
|
@ -1003,10 +1003,6 @@ extern "C" void LLVMRustDIBuilderDispose(LLVMDIBuilderRef Builder) {
|
||||||
delete unwrap(Builder);
|
delete unwrap(Builder);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustDIBuilderFinalize(LLVMDIBuilderRef Builder) {
|
|
||||||
unwrap(Builder)->finalize();
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateCompileUnit(
|
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateCompileUnit(
|
||||||
LLVMDIBuilderRef Builder, unsigned Lang, LLVMMetadataRef FileRef,
|
LLVMDIBuilderRef Builder, unsigned Lang, LLVMMetadataRef FileRef,
|
||||||
const char *Producer, size_t ProducerLen, bool isOptimized,
|
const char *Producer, size_t ProducerLen, bool isOptimized,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue