Skip to content

Commit

Permalink
Relax assertion in ReplaceableMetadataImpl::replaceAllUsesWith().
Browse files Browse the repository at this point in the history
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>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259973 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
adrian-prantl committed Feb 6, 2016
1 parent 2060375 commit e56d199
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/IR/Metadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit e56d199

Please sign in to comment.