Relax assertion in ReplaceableMetadataImpl::replaceAllUsesWith().

There is a legitimate use-case in clang where we need to replace a
temporary placeholder node with the temporary node that may be a
forward declaration.

<rdar://problem/24493203>

llvm-svn: 259973
This commit is contained in:
Adrian Prantl 2016-02-06 01:56:55 +00:00
parent 41571781c0
commit b925b9c85f
1 changed files with 0 additions and 2 deletions

View File

@ -188,8 +188,6 @@ void ReplaceableMetadataImpl::moveRef(void *Ref, void *New,
}
void ReplaceableMetadataImpl::replaceAllUsesWith(Metadata *MD) {
assert(!(MD && isa<MDNode>(MD) && cast<MDNode>(MD)->isTemporary()) &&
"Expected non-temp node");
assert(CanReplace &&
"Attempted to replace Metadata marked for no replacement");