mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 06:33:21 +00: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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225903 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c60bd0cf4b
commit
fbf153aebb
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user