summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Metadata.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-02-06 01:56:55 +0000
committerAdrian Prantl <aprantl@apple.com>2016-02-06 01:56:55 +0000
commitb925b9c85f36cddbcd69bdcc44f5725cafe0d7b6 (patch)
tree3f16bec11f2ab871c778989e7d13c8f5a9bcc404 /llvm/lib/IR/Metadata.cpp
parent41571781c01723a64a0d2fa3e82b1b7f3f2c28dc (diff)
downloadbcm5719-llvm-b925b9c85f36cddbcd69bdcc44f5725cafe0d7b6.tar.gz
bcm5719-llvm-b925b9c85f36cddbcd69bdcc44f5725cafe0d7b6.zip
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
Diffstat (limited to 'llvm/lib/IR/Metadata.cpp')
-rw-r--r--llvm/lib/IR/Metadata.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp
index 543eaac483d..cc0c568c861 100644
--- a/llvm/lib/IR/Metadata.cpp
+++ b/llvm/lib/IR/Metadata.cpp
@@ -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");
OpenPOWER on IntegriCloud