diff --git a/lib/SPIRV/SPIRVReader.cpp b/lib/SPIRV/SPIRVReader.cpp index 476c339cba..66f94ce7cf 100644 --- a/lib/SPIRV/SPIRVReader.cpp +++ b/lib/SPIRV/SPIRVReader.cpp @@ -700,7 +700,7 @@ void SPIRVToLLVM::setLLVMLoopMetadata(const LoopInstType *LM, if (!LM) return; - auto Temp = MDNode::getTemporary(*Context, std::nullopt); + auto Temp = MDNode::getTemporary(*Context, {}); auto *Self = MDNode::get(*Context, Temp.get()); Self->replaceOperandWith(0, Self); SPIRVWord LC = LM->getLoopControl(); @@ -850,8 +850,7 @@ void SPIRVToLLVM::setLLVMLoopMetadata(const LoopInstType *LM, // Emit a distinct index group that will be referenced from // llvm.loop.parallel_access_indices metadata; hash the new // MDNode for future accesses to the same memory. - CurrentDepthIdxGroup = - llvm::MDNode::getDistinct(*Context, std::nullopt); + CurrentDepthIdxGroup = llvm::MDNode::getDistinct(*Context, {}); OffsetIdxGroupMap.emplace(Info, CurrentDepthIdxGroup); } else { // Previous accesses to that field have already been indexed, @@ -861,8 +860,7 @@ void SPIRVToLLVM::setLLVMLoopMetadata(const LoopInstType *LM, } else /* Regular kernel-scope array/pointer variable */ { // Emit a distinct index group that will be referenced from // llvm.loop.parallel_access_indices metadata - CurrentDepthIdxGroup = - llvm::MDNode::getDistinct(*Context, std::nullopt); + CurrentDepthIdxGroup = llvm::MDNode::getDistinct(*Context, {}); } unsigned Safelen = PointerSflnMap.find(ArrayGEPIt.first)->second;