Skip to content

Commit d64ba38

Browse files
committed
Update after ArrayRef(std::nullopt) deprecation
Update for llvm-project commit 2529de5c935a ("[ADT] Deprecate ArrayRef(std::nullopt) (#146011)", 2025-06-27).
1 parent dcfd949 commit d64ba38

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/SPIRV/SPIRVReader.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ void SPIRVToLLVM::setLLVMLoopMetadata(const LoopInstType *LM,
700700
if (!LM)
701701
return;
702702

703-
auto Temp = MDNode::getTemporary(*Context, std::nullopt);
703+
auto Temp = MDNode::getTemporary(*Context, {});
704704
auto *Self = MDNode::get(*Context, Temp.get());
705705
Self->replaceOperandWith(0, Self);
706706
SPIRVWord LC = LM->getLoopControl();
@@ -851,7 +851,7 @@ void SPIRVToLLVM::setLLVMLoopMetadata(const LoopInstType *LM,
851851
// llvm.loop.parallel_access_indices metadata; hash the new
852852
// MDNode for future accesses to the same memory.
853853
CurrentDepthIdxGroup =
854-
llvm::MDNode::getDistinct(*Context, std::nullopt);
854+
llvm::MDNode::getDistinct(*Context, {});
855855
OffsetIdxGroupMap.emplace(Info, CurrentDepthIdxGroup);
856856
} else {
857857
// Previous accesses to that field have already been indexed,
@@ -862,7 +862,7 @@ void SPIRVToLLVM::setLLVMLoopMetadata(const LoopInstType *LM,
862862
// Emit a distinct index group that will be referenced from
863863
// llvm.loop.parallel_access_indices metadata
864864
CurrentDepthIdxGroup =
865-
llvm::MDNode::getDistinct(*Context, std::nullopt);
865+
llvm::MDNode::getDistinct(*Context, {});
866866
}
867867

868868
unsigned Safelen = PointerSflnMap.find(ArrayGEPIt.first)->second;

0 commit comments

Comments
 (0)