mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
Remove LLVMRustDIBuilderInsertDeclareAtEnd return value
The return value changed from an Instruction to a DbgRecord in LLVM 19. As we don't actually use the result, drop the return value entirely to support both.
This commit is contained in:
parent
776b0adaaf
commit
8dfd3a455d
@ -2057,7 +2057,7 @@ extern "C" {
|
|||||||
AddrOpsCount: c_uint,
|
AddrOpsCount: c_uint,
|
||||||
DL: &'a DILocation,
|
DL: &'a DILocation,
|
||||||
InsertAtEnd: &'a BasicBlock,
|
InsertAtEnd: &'a BasicBlock,
|
||||||
) -> &'a Value;
|
);
|
||||||
|
|
||||||
pub fn LLVMRustDIBuilderCreateEnumerator<'a>(
|
pub fn LLVMRustDIBuilderCreateEnumerator<'a>(
|
||||||
Builder: &DIBuilder<'a>,
|
Builder: &DIBuilder<'a>,
|
||||||
|
@ -1137,20 +1137,15 @@ LLVMRustDIBuilderGetOrCreateArray(LLVMRustDIBuilderRef Builder,
|
|||||||
Builder->getOrCreateArray(ArrayRef<Metadata *>(DataValue, Count)).get());
|
Builder->getOrCreateArray(ArrayRef<Metadata *>(DataValue, Count)).get());
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" LLVMValueRef LLVMRustDIBuilderInsertDeclareAtEnd(
|
extern "C" void LLVMRustDIBuilderInsertDeclareAtEnd(
|
||||||
LLVMRustDIBuilderRef Builder, LLVMValueRef V, LLVMMetadataRef VarInfo,
|
LLVMRustDIBuilderRef Builder, LLVMValueRef V, LLVMMetadataRef VarInfo,
|
||||||
uint64_t *AddrOps, unsigned AddrOpsCount, LLVMMetadataRef DL,
|
uint64_t *AddrOps, unsigned AddrOpsCount, LLVMMetadataRef DL,
|
||||||
LLVMBasicBlockRef InsertAtEnd) {
|
LLVMBasicBlockRef InsertAtEnd) {
|
||||||
auto Result = Builder->insertDeclare(
|
Builder->insertDeclare(unwrap(V), unwrap<DILocalVariable>(VarInfo),
|
||||||
unwrap(V), unwrap<DILocalVariable>(VarInfo),
|
|
||||||
Builder->createExpression(
|
Builder->createExpression(
|
||||||
llvm::ArrayRef<uint64_t>(AddrOps, AddrOpsCount)),
|
llvm::ArrayRef<uint64_t>(AddrOps, AddrOpsCount)),
|
||||||
DebugLoc(cast<MDNode>(unwrap(DL))), unwrap(InsertAtEnd));
|
DebugLoc(cast<MDNode>(unwrap(DL))),
|
||||||
#if LLVM_VERSION_GE(19, 0)
|
unwrap(InsertAtEnd));
|
||||||
return wrap(Result.get<llvm::Instruction *>());
|
|
||||||
#else
|
|
||||||
return wrap(Result);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateEnumerator(
|
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateEnumerator(
|
||||||
|
Loading…
Reference in New Issue
Block a user