diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-02-20 11:27:04 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-02-20 11:27:04 +0000 |
commit | fb782ce954671ea444714a3fa493275e12217bdb (patch) | |
tree | 998a5c34c25ab843be89f44a848aab5a719e6603 /lib/Linker/LinkModules.cpp | |
parent | 8522e1cb53143973c245b49b21e353ed046b195d (diff) | |
download | external_llvm-fb782ce954671ea444714a3fa493275e12217bdb.zip external_llvm-fb782ce954671ea444714a3fa493275e12217bdb.tar.gz external_llvm-fb782ce954671ea444714a3fa493275e12217bdb.tar.bz2 |
And final pack of warnings silencing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47372 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker/LinkModules.cpp')
-rw-r--r-- | lib/Linker/LinkModules.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index a8995d6..1ae609d 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -951,16 +951,19 @@ Linker::LinkModules(Module *Dest, Module *Src, std::string *ErrorMsg) { } else { std::string DataLayout; - if (Dest->getEndianness() == Module::AnyEndianness) + if (Dest->getEndianness() == Module::AnyEndianness) { if (Src->getEndianness() == Module::BigEndian) DataLayout.append("E"); else if (Src->getEndianness() == Module::LittleEndian) DataLayout.append("e"); - if (Dest->getPointerSize() == Module::AnyPointerSize) + } + + if (Dest->getPointerSize() == Module::AnyPointerSize) { if (Src->getPointerSize() == Module::Pointer64) DataLayout.append(DataLayout.length() == 0 ? "p:64:64" : "-p:64:64"); else if (Src->getPointerSize() == Module::Pointer32) DataLayout.append(DataLayout.length() == 0 ? "p:32:32" : "-p:32:32"); + } Dest->setDataLayout(DataLayout); } } |