mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-11 08:29:25 +00:00
bitcode writer support for blockaddress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85376 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -853,6 +853,13 @@ static void WriteConstants(unsigned FirstVal, unsigned LastVal,
|
||||
Record.push_back(CE->getPredicate());
|
||||
break;
|
||||
}
|
||||
} else if (const BlockAddress *BA = dyn_cast<BlockAddress>(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()));
|
||||
Record.push_back(VE.getGlobalBasicBlockID(BA->getBasicBlock()));
|
||||
} else {
|
||||
llvm_unreachable("Unknown constant!");
|
||||
}
|
||||
|
Reference in New Issue
Block a user