mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
For PR761:
Implement reading and writing of the Module's data layout string. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33346 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2014,6 +2014,13 @@ void BytecodeReader::ParseModuleGlobalInfo() {
|
||||
if (Handler)
|
||||
Handler->handleTargetTriple(triple);
|
||||
|
||||
// Read the data layout string and place into the module.
|
||||
std::string datalayout = read_str();
|
||||
TheModule->setDataLayout(datalayout);
|
||||
// FIXME: Implement
|
||||
// if (Handler)
|
||||
// Handler->handleDataLayout(datalayout);
|
||||
|
||||
if (At != BlockEnd) {
|
||||
// If the file has section info in it, read the section names now.
|
||||
unsigned NumSections = read_vbr_uint();
|
||||
|
@@ -1091,6 +1091,9 @@ void BytecodeWriter::outputModuleInfoBlock(const Module *M) {
|
||||
// Output the target triple from the module
|
||||
output(M->getTargetTriple());
|
||||
|
||||
// Output the data layout from the module
|
||||
output(M->getDataLayout());
|
||||
|
||||
// Emit the table of section names.
|
||||
output_vbr((unsigned)SectionNames.size());
|
||||
for (unsigned i = 0, e = SectionNames.size(); i != e; ++i)
|
||||
|
Reference in New Issue
Block a user