1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

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.

llvm-svn: 225903
This commit is contained in:
Duncan P. N. Exon Smith 2015-01-14 01:05:17 +00:00
parent 924cd172c7
commit bc788669d1

View File

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