Skip to content

Commit 2e8f7ff

Browse files
Update llvm/tools/sycl-post-link/CUDASpecConstantToSymbol.cpp
Co-authored-by: Alexey Sachkov <[email protected]>
1 parent c67d56a commit 2e8f7ff

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/tools/sycl-post-link/CUDASpecConstantToSymbol.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,8 @@ static GlobalVariable *createGlobal(Module &M, size_t Size, StringRef Name,
4949
}
5050

5151
static unsigned uintFromMDNode(const MDNode *Node, unsigned OpNumber) {
52-
auto *CMD =
53-
cast<ConstantAsMetadata>(Node->getOperand(OpNumber).get())->getValue();
54-
return static_cast<unsigned>(CMD->getUniqueInteger().getZExtValue());
52+
return static_cast<unsigned>(mdconst::extract<ConstantInt>(
53+
Node->getOperand(OpNumber).get())->getZExtValue());
5554
}
5655

5756
std::pair<MDNode *, Function *>

0 commit comments

Comments
 (0)