For PR761:

Implement reading and writing of the Module's data layout string.

llvm-svn: 33346
This commit is contained in:
Reid Spencer 2007-01-18 23:24:24 +00:00
parent 97057f37a5
commit 650d292f89
2 changed files with 10 additions and 0 deletions

View File

@ -2013,6 +2013,13 @@ void BytecodeReader::ParseModuleGlobalInfo() {
TheModule->setTargetTriple(triple);
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.

View File

@ -1090,6 +1090,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());