[llvm-commits] [llvm] r122637 - /llvm/trunk/lib/Linker/LinkModules.cpp
Chris Lattner
sabre at nondot.org
Wed Dec 29 18:49:46 PST 2010
Author: lattner
Date: Wed Dec 29 20:49:45 2010
New Revision: 122637
URL: http://llvm.org/viewvc/llvm-project?rev=122637&view=rev
Log:
include the module identifier when emitting this warning, PR8865.
Modified:
llvm/trunk/lib/Linker/LinkModules.cpp
Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=122637&r1=122636&r2=122637&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Wed Dec 29 20:49:45 2010
@@ -1218,10 +1218,13 @@
Src->getDataLayout() != Dest->getDataLayout())
errs() << "WARNING: Linking two modules of different data layouts!\n";
if (!Src->getTargetTriple().empty() &&
- Dest->getTargetTriple() != Src->getTargetTriple())
- errs() << "WARNING: Linking two modules of different target triples: '"
- << Src->getTargetTriple() << "' and '" << Dest->getTargetTriple()
- << "'\n";
+ Dest->getTargetTriple() != Src->getTargetTriple()) {
+ errs() << "WARNING: Linking two modules of different target triples: ";
+ if (!Src->getModuleIdentifier().empty())
+ errs() << Src->getModuleIdentifier() << ": ";
+ errs() << "'" << Src->getTargetTriple() << "' and '"
+ << Dest->getTargetTriple() << "'\n";
+ }
// Append the module inline asm string.
if (!Src->getModuleInlineAsm().empty()) {
More information about the llvm-commits
mailing list