aboutsummaryrefslogtreecommitdiff
path: root/lib/Linker
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-12-30 02:49:45 +0000
committerChris Lattner <sabre@nondot.org>2010-12-30 02:49:45 +0000
commita797ee0210902669833720f9df7c3be5e58c1401 (patch)
tree9d0817318ff67007e4bfd12df5a86c2490f7dbeb /lib/Linker
parentc7bad7760609845377d7612a41df5529e01a39b3 (diff)
include the module identifier when emitting this warning, PR8865.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122637 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker')
-rw-r--r--lib/Linker/LinkModules.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index 025aec9957..d99e0a06b6 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -1218,10 +1218,13 @@ Linker::LinkModules(Module *Dest, Module *Src, std::string *ErrorMsg) {
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()) {