From c4bdb93d6a4d8eb40584554e0cc4fc3e3732f707 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 26 Feb 2014 17:02:08 +0000 Subject: 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 --- lib/Linker/LinkModules.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Linker') 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"; } -- cgit v1.2.3