diff --git a/llvm/lib/Transforms/Utils/ValueMapper.cpp b/llvm/lib/Transforms/Utils/ValueMapper.cpp index 4033ccbf1527..89f619b66a43 100644 --- a/llvm/lib/Transforms/Utils/ValueMapper.cpp +++ b/llvm/lib/Transforms/Utils/ValueMapper.cpp @@ -213,7 +213,7 @@ static Metadata *mapDistinctNode(const UniquableMDNode *Node, assert(Node->isDistinct() && "Expected distinct node"); // Create the node first so it's available for cyclical references. - MDNode *NewMD = MDNode::replaceWithDistinct(cloneMDNode(Node)); + UniquableMDNode *NewMD = MDNode::replaceWithDistinct(cloneMDNode(Node)); mapToMetadata(VM, Node, NewMD); // Fix the operands.