mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-12 01:25:10 +00:00
Make blockaddress(@func, null) be valid, and make 'deleting a basic
block with a blockaddress still referring to it' replace the invalid blockaddress with a new blockaddress(@func, null) instead of a inttoptr(1). This changes the bitcode encoding format, and still needs codegen support (this should produce a non-zero value, referring to the entry block of the function would also be quite reasonable). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85678 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -854,7 +854,8 @@ static void WriteConstants(unsigned FirstVal, unsigned LastVal,
|
||||
break;
|
||||
}
|
||||
} else if (const BlockAddress *BA = dyn_cast<BlockAddress>(C)) {
|
||||
assert(BA->getFunction() == BA->getBasicBlock()->getParent() &&
|
||||
assert((!BA->getBasicBlock() ||
|
||||
BA->getFunction() == BA->getBasicBlock()->getParent()) &&
|
||||
"Malformed blockaddress");
|
||||
Code = bitc::CST_CODE_BLOCKADDRESS;
|
||||
Record.push_back(VE.getTypeID(BA->getFunction()->getType()));
|
||||
|
Reference in New Issue
Block a user