summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
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
commitae593f1563e615ded29b4f3d7ec0635492bc2db1 (patch)
treeee7ec61520c910f741741abcf83fd2c2b72ead7c /llvm/lib/Linker/LinkModules.cpp
parent667fcb839eefb2f12ea1d7216189759f0bddd33e (diff)
downloadbcm5719-llvm-ae593f1563e615ded29b4f3d7ec0635492bc2db1.tar.gz
bcm5719-llvm-ae593f1563e615ded29b4f3d7ec0635492bc2db1.zip
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! llvm-svn: 202276
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index f1b8cb76106..9160e2661b7 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/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";
}
OpenPOWER on IntegriCloud