Skip to content

Commit

Permalink
Merge pull request #577 from hvdijk/fix-destroyed-array
Browse files Browse the repository at this point in the history
Builder::create<OpBranchConditional>: Fix access to destroyed array.
  • Loading branch information
hvdijk authored Oct 30, 2024
2 parents 18e5871 + 66fe147 commit 910f96c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/compiler/spirv-ll/source/builder_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6042,11 +6042,11 @@ llvm::Error Builder::create<OpBranchConditional>(
branch_inst->setMetadata(md_nodes.front().second, md_nodes.front().first);
} else {
// if both possible nodes are needed create an `MDTuple` out of them
const llvm::ArrayRef<llvm::Metadata *> md_arr = {md_nodes[0].first,
md_nodes[1].first};
llvm::Metadata *md_arr[] = {md_nodes[0].first, md_nodes[1].first};

branch_inst->setMetadata(
"MDTuple", llvm::MDTuple::get(*context.llvmContext, md_arr));
"MDTuple",
llvm::MDTuple::get(*context.llvmContext, llvm::ArrayRef(md_arr)));
}
}

Expand Down

0 comments on commit 910f96c

Please sign in to comment.