Utils: MDNode => UniquableMDNode, NFC

Although this makes the `cast<>` assert more often, the
`assert(Node->isResolved())` on the following line would assert in all
those cases.  So, no functionality change here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225903 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith 2015-01-14 01:05:17 +00:00
parent c60bd0cf4b
commit fbf153aebb

View File

@ -183,8 +183,8 @@ static Metadata *mapMetadataOp(Metadata *Op, ValueToValueMapTy &VM,
/// \brief Map a distinct MDNode.
///
/// Distinct nodes are not uniqued, so they must always recreated.
static Metadata *mapDistinctNode(const MDNode *Node, ValueToValueMapTy &VM,
RemapFlags Flags,
static Metadata *mapDistinctNode(const UniquableMDNode *Node,
ValueToValueMapTy &VM, RemapFlags Flags,
ValueMapTypeRemapper *TypeMapper,
ValueMaterializer *Materializer) {
assert(Node->isDistinct() && "Expected distinct node");
@ -234,7 +234,7 @@ static Metadata *MapMetadataImpl(const Metadata *MD, ValueToValueMapTy &VM,
return nullptr;
}
const MDNode *Node = cast<MDNode>(MD);
const UniquableMDNode *Node = cast<UniquableMDNode>(MD);
assert(Node->isResolved() && "Unexpected unresolved node");
// If this is a module-level metadata and we know that nothing at the