[llvm][Bitcode] Add bitcode reader/writer for DSOLocalEquivalent
This is necessary for compilation with [thin]lto. Differential Revision: https://reviews.llvm.org/D96170
This commit is contained in:
@@ -2609,6 +2609,10 @@ void ModuleBitcodeWriter::writeConstants(unsigned FirstVal, unsigned LastVal,
|
||||
Record.push_back(VE.getTypeID(BA->getFunction()->getType()));
|
||||
Record.push_back(VE.getValueID(BA->getFunction()));
|
||||
Record.push_back(VE.getGlobalBasicBlockID(BA->getBasicBlock()));
|
||||
} else if (const auto *Equiv = dyn_cast<DSOLocalEquivalent>(C)) {
|
||||
Code = bitc::CST_CODE_DSO_LOCAL_EQUIVALENT;
|
||||
Record.push_back(VE.getTypeID(Equiv->getGlobalValue()->getType()));
|
||||
Record.push_back(VE.getValueID(Equiv->getGlobalValue()));
|
||||
} else {
|
||||
#ifndef NDEBUG
|
||||
C->dump();
|
||||
|
||||
Reference in New Issue
Block a user