From 64c92844118f740cb08749f7ca3e0a8f2ef99c85 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! llvm-svn: 131016 --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp') diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index e34137f6155a..e652e082d164 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/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