[llvm] r259973 - Relax assertion in ReplaceableMetadataImpl::replaceAllUsesWith().
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 5 17:56:55 PST 2016
Author: adrian
Date: Fri Feb 5 19:56:55 2016
New Revision: 259973
URL: http://llvm.org/viewvc/llvm-project?rev=259973&view=rev
Log:
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>
Modified:
llvm/trunk/lib/IR/Metadata.cpp
Modified: llvm/trunk/lib/IR/Metadata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Metadata.cpp?rev=259973&r1=259972&r2=259973&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Metadata.cpp (original)
+++ llvm/trunk/lib/IR/Metadata.cpp Fri Feb 5 19:56:55 2016
@@ -188,8 +188,6 @@ void ReplaceableMetadataImpl::moveRef(vo
}
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");
More information about the llvm-commits
mailing list