aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Reader
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-18 23:24:24 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-18 23:24:24 +0000
commit4b70161b69ab4d038bee38970fafcb00d0a6b03b (patch)
tree14e03018250367c3ba352a1e246c6381ee2a0fb8 /lib/Bytecode/Reader
parentae19abc2cc81fea233d08148287052204112f489 (diff)
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
Diffstat (limited to 'lib/Bytecode/Reader')
-rw-r--r--lib/Bytecode/Reader/Reader.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp
index efdb4f17d2..355fc1df4c 100644
--- a/lib/Bytecode/Reader/Reader.cpp
+++ b/lib/Bytecode/Reader/Reader.cpp
@@ -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.