From ae593f1563e615ded29b4f3d7ec0635492bc2db1 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! llvm-svn: 202276 --- llvm/lib/Linker/LinkModules.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Linker/LinkModules.cpp') 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"; } -- cgit v1.2.3