summaryrefslogtreecommitdiff
path: root/lib/Linker
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-02-26 17:02:08 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-02-26 17:02:08 +0000
commitc4bdb93d6a4d8eb40584554e0cc4fc3e3732f707 (patch)
tree25c6a5fb60aefed9e2f8e77e751c3e4b915a8e9b /lib/Linker
parente3561972d45633cee705084ce1e26c4ecbbe8d43 (diff)
downloadllvm-c4bdb93d6a4d8eb40584554e0cc4fc3e3732f707.tar.gz
llvm-c4bdb93d6a4d8eb40584554e0cc4fc3e3732f707.tar.bz2
llvm-c4bdb93d6a4d8eb40584554e0cc4fc3e3732f707.tar.xz
Compare DataLayout by Value, not by pointer.
This fixes spurious warnings in llvm-link about the datalayout not matching. Thanks to Zalman Stern for reporting the bug! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202276 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker')
-rw-r--r--lib/Linker/LinkModules.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index f1b8cb7610..9160e2661b 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -1208,7 +1208,7 @@ bool ModuleLinker::run() {
DstM->setTargetTriple(SrcM->getTargetTriple());
if (SrcM->getDataLayout() && DstM->getDataLayout() &&
- SrcM->getDataLayout() != DstM->getDataLayout()) {
+ *SrcM->getDataLayout() != *DstM->getDataLayout()) {
if (!SuppressWarnings) {
errs() << "WARNING: Linking two modules of different data layouts!\n";
}