From 308fba5fe2714f28984d973d79f948dc24ba23b4 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Fri, 6 May 2011 21:09:44 +0000 Subject: It's valid to take the blockaddress of a different function, so remove this assert in the bitcode writer. No change needed because the ValueEnumerator holds a whole-module numbering anyhow. Fixes PR9857! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131016 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bitcode/Writer/BitcodeWriter.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/Bitcode/Writer/BitcodeWriter.cpp') diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index e34137f615..e652e082d1 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -871,8 +871,6 @@ static void WriteConstants(unsigned FirstVal, unsigned LastVal, break; } } else if (const BlockAddress *BA = dyn_cast(C)) { - assert(BA->getFunction() == BA->getBasicBlock()->getParent() && - "Malformed blockaddress"); Code = bitc::CST_CODE_BLOCKADDRESS; Record.push_back(VE.getTypeID(BA->getFunction()->getType())); Record.push_back(VE.getValueID(BA->getFunction())); -- cgit v1.2.3-18-g5258