mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 00:20:11 +00:00
Improve LinkModules warnings
Provide triple and data layout as well as module names (or empty string) when there's a mismatch. Differential Revision: http://llvm-reviews.chandlerc.com/D2971 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203009 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1210,16 +1210,20 @@ bool ModuleLinker::run() {
|
||||
if (SrcM->getDataLayout() && DstM->getDataLayout() &&
|
||||
*SrcM->getDataLayout() != *DstM->getDataLayout()) {
|
||||
if (!SuppressWarnings) {
|
||||
errs() << "WARNING: Linking two modules of different data layouts!\n";
|
||||
errs() << "WARNING: Linking two modules of different data layouts: '"
|
||||
<< SrcM->getModuleIdentifier() << "' is '"
|
||||
<< SrcM->getDataLayoutStr() << "' whereas '"
|
||||
<< DstM->getModuleIdentifier() << "' is '"
|
||||
<< DstM->getDataLayoutStr() << "'\n";
|
||||
}
|
||||
}
|
||||
if (!SrcM->getTargetTriple().empty() &&
|
||||
DstM->getTargetTriple() != SrcM->getTargetTriple()) {
|
||||
if (!SuppressWarnings) {
|
||||
errs() << "WARNING: Linking two modules of different target triples: ";
|
||||
if (!SrcM->getModuleIdentifier().empty())
|
||||
errs() << SrcM->getModuleIdentifier() << ": ";
|
||||
errs() << "'" << SrcM->getTargetTriple() << "' and '"
|
||||
errs() << "WARNING: Linking two modules of different target triples: "
|
||||
<< SrcM->getModuleIdentifier() << "' is '"
|
||||
<< SrcM->getTargetTriple() << "' whereas '"
|
||||
<< DstM->getModuleIdentifier() << "' is '"
|
||||
<< DstM->getTargetTriple() << "'\n";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user