Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit e56d199

Browse files
committed
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> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259973 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 2060375 commit e56d199

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

lib/IR/Metadata.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,6 @@ void ReplaceableMetadataImpl::moveRef(void *Ref, void *New,
188188
}
189189

190190
void ReplaceableMetadataImpl::replaceAllUsesWith(Metadata *MD) {
191-
assert(!(MD && isa<MDNode>(MD) && cast<MDNode>(MD)->isTemporary()) &&
192-
"Expected non-temp node");
193191
assert(CanReplace &&
194192
"Attempted to replace Metadata marked for no replacement");
195193

0 commit comments

Comments
 (0)