From e56d199eb3bc85d981de5fab1fb82e0ad502575b Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Sat, 6 Feb 2016 01:56:55 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259973 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/IR/Metadata.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/IR/Metadata.cpp b/lib/IR/Metadata.cpp index 543eaac483d3..cc0c568c8613 100644 --- a/lib/IR/Metadata.cpp +++ b/lib/IR/Metadata.cpp @@ -188,8 +188,6 @@ void ReplaceableMetadataImpl::moveRef(void *Ref, void *New, } void ReplaceableMetadataImpl::replaceAllUsesWith(Metadata *MD) { - assert(!(MD && isa(MD) && cast(MD)->isTemporary()) && - "Expected non-temp node"); assert(CanReplace && "Attempted to replace Metadata marked for no replacement");