Skip to content

Commit

Permalink
Unrolled build for rust-lang#122381
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#122381 - krasimirgg:llvm-19-mar, r=durin42

llvm-wrapper: adapt for LLVM API changes

Adapts rust for llvm/llvm-project@9997e03.

`@rustbot` label: +llvm-main
r? `@durin42`
  • Loading branch information
rust-timer committed Mar 12, 2024
2 parents 7de1a1f + 0a2ddcd commit 9099989
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1112,11 +1112,16 @@ extern "C" LLVMValueRef LLVMRustDIBuilderInsertDeclareAtEnd(
LLVMRustDIBuilderRef Builder, LLVMValueRef V, LLVMMetadataRef VarInfo,
uint64_t *AddrOps, unsigned AddrOpsCount, LLVMMetadataRef DL,
LLVMBasicBlockRef InsertAtEnd) {
return wrap(Builder->insertDeclare(
auto Result = Builder->insertDeclare(
unwrap(V), unwrap<DILocalVariable>(VarInfo),
Builder->createExpression(llvm::ArrayRef<uint64_t>(AddrOps, AddrOpsCount)),
DebugLoc(cast<MDNode>(unwrap(DL))),
unwrap(InsertAtEnd)));
unwrap(InsertAtEnd));
#if LLVM_VERSION_GE(19, 0)
return wrap(Result.get<llvm::Instruction *>());
#else
return wrap(Result);
#endif
}

extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateEnumerator(
Expand Down

0 comments on commit 9099989

Please sign in to comment.