mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Fix bug: Linker/2003-10-21-ConflictingTypesTolerance.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9357 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -215,20 +215,17 @@ static bool LinkTypes(Module *Dest, const Module *Src, std::string *Err) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If we STILL cannot resolve the types, then there is something wrong.
|
// If we STILL cannot resolve the types, then there is something wrong.
|
||||||
// Report the error.
|
// Report the warning and delete one of the names.
|
||||||
if (DelayedTypesToResolve.size() == OldSize) {
|
if (DelayedTypesToResolve.size() == OldSize) {
|
||||||
// Build up an error message of all of the mismatched types.
|
const std::string &Name = DelayedTypesToResolve.back();
|
||||||
std::string ErrorMessage;
|
|
||||||
for (unsigned i = 0, e = DelayedTypesToResolve.size(); i != e; ++i) {
|
const Type *T1 = cast<Type>(VM.find(Name)->second);
|
||||||
const std::string &Name = DelayedTypesToResolve[i];
|
const Type *T2 = cast<Type>(DestST->lookup(Type::TypeTy, Name));
|
||||||
const Type *T1 = cast<Type>(VM.find(Name)->second);
|
std::cerr << "WARNING: Type conflict between types named '" << Name
|
||||||
const Type *T2 = cast<Type>(DestST->lookup(Type::TypeTy, Name));
|
<< "'.\n Src='" << *T1 << "'.\n Dest='" << *T2 << "'\n";
|
||||||
ErrorMessage += " Type named '" + Name +
|
|
||||||
"' conflicts.\n Src='" + T1->getDescription() +
|
// Remove the symbol name from the destination.
|
||||||
"'.\n Dest='" + T2->getDescription() + "'\n";
|
DelayedTypesToResolve.pop_back();
|
||||||
}
|
|
||||||
return Error(Err, "Type conflict between types in modules:\n" +
|
|
||||||
ErrorMessage);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -215,20 +215,17 @@ static bool LinkTypes(Module *Dest, const Module *Src, std::string *Err) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If we STILL cannot resolve the types, then there is something wrong.
|
// If we STILL cannot resolve the types, then there is something wrong.
|
||||||
// Report the error.
|
// Report the warning and delete one of the names.
|
||||||
if (DelayedTypesToResolve.size() == OldSize) {
|
if (DelayedTypesToResolve.size() == OldSize) {
|
||||||
// Build up an error message of all of the mismatched types.
|
const std::string &Name = DelayedTypesToResolve.back();
|
||||||
std::string ErrorMessage;
|
|
||||||
for (unsigned i = 0, e = DelayedTypesToResolve.size(); i != e; ++i) {
|
const Type *T1 = cast<Type>(VM.find(Name)->second);
|
||||||
const std::string &Name = DelayedTypesToResolve[i];
|
const Type *T2 = cast<Type>(DestST->lookup(Type::TypeTy, Name));
|
||||||
const Type *T1 = cast<Type>(VM.find(Name)->second);
|
std::cerr << "WARNING: Type conflict between types named '" << Name
|
||||||
const Type *T2 = cast<Type>(DestST->lookup(Type::TypeTy, Name));
|
<< "'.\n Src='" << *T1 << "'.\n Dest='" << *T2 << "'\n";
|
||||||
ErrorMessage += " Type named '" + Name +
|
|
||||||
"' conflicts.\n Src='" + T1->getDescription() +
|
// Remove the symbol name from the destination.
|
||||||
"'.\n Dest='" + T2->getDescription() + "'\n";
|
DelayedTypesToResolve.pop_back();
|
||||||
}
|
|
||||||
return Error(Err, "Type conflict between types in modules:\n" +
|
|
||||||
ErrorMessage);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -215,20 +215,17 @@ static bool LinkTypes(Module *Dest, const Module *Src, std::string *Err) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If we STILL cannot resolve the types, then there is something wrong.
|
// If we STILL cannot resolve the types, then there is something wrong.
|
||||||
// Report the error.
|
// Report the warning and delete one of the names.
|
||||||
if (DelayedTypesToResolve.size() == OldSize) {
|
if (DelayedTypesToResolve.size() == OldSize) {
|
||||||
// Build up an error message of all of the mismatched types.
|
const std::string &Name = DelayedTypesToResolve.back();
|
||||||
std::string ErrorMessage;
|
|
||||||
for (unsigned i = 0, e = DelayedTypesToResolve.size(); i != e; ++i) {
|
const Type *T1 = cast<Type>(VM.find(Name)->second);
|
||||||
const std::string &Name = DelayedTypesToResolve[i];
|
const Type *T2 = cast<Type>(DestST->lookup(Type::TypeTy, Name));
|
||||||
const Type *T1 = cast<Type>(VM.find(Name)->second);
|
std::cerr << "WARNING: Type conflict between types named '" << Name
|
||||||
const Type *T2 = cast<Type>(DestST->lookup(Type::TypeTy, Name));
|
<< "'.\n Src='" << *T1 << "'.\n Dest='" << *T2 << "'\n";
|
||||||
ErrorMessage += " Type named '" + Name +
|
|
||||||
"' conflicts.\n Src='" + T1->getDescription() +
|
// Remove the symbol name from the destination.
|
||||||
"'.\n Dest='" + T2->getDescription() + "'\n";
|
DelayedTypesToResolve.pop_back();
|
||||||
}
|
|
||||||
return Error(Err, "Type conflict between types in modules:\n" +
|
|
||||||
ErrorMessage);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user