mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Implement: Linker/2003-08-24-InheritPtrSize.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8129 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f687adae9b
commit
873c5e7859
@ -761,9 +761,16 @@ static bool LinkAppendingVars(Module *M,
|
||||
// shouldn't be relied on to be consistent.
|
||||
//
|
||||
bool LinkModules(Module *Dest, const Module *Src, std::string *ErrorMsg) {
|
||||
if (Dest->getEndianness() != Src->getEndianness())
|
||||
if (Dest->getEndianness() == Module::AnyEndianness)
|
||||
Dest->setEndianness(Src->getEndianness());
|
||||
if (Dest->getPointerSize() == Module::AnyPointerSize)
|
||||
Dest->setPointerSize(Src->getPointerSize());
|
||||
|
||||
if (Src->getEndianness() != Module::AnyEndianness &&
|
||||
Dest->getEndianness() != Src->getEndianness())
|
||||
std::cerr << "WARNING: Linking two modules of different endianness!\n";
|
||||
if (Dest->getPointerSize() != Src->getPointerSize())
|
||||
if (Src->getPointerSize() != Module::AnyPointerSize &&
|
||||
Dest->getPointerSize() != Src->getPointerSize())
|
||||
std::cerr << "WARNING: Linking two modules of different pointer size!\n";
|
||||
|
||||
// LinkTypes - Go through the symbol table of the Src module and see if any
|
||||
|
@ -761,9 +761,16 @@ static bool LinkAppendingVars(Module *M,
|
||||
// shouldn't be relied on to be consistent.
|
||||
//
|
||||
bool LinkModules(Module *Dest, const Module *Src, std::string *ErrorMsg) {
|
||||
if (Dest->getEndianness() != Src->getEndianness())
|
||||
if (Dest->getEndianness() == Module::AnyEndianness)
|
||||
Dest->setEndianness(Src->getEndianness());
|
||||
if (Dest->getPointerSize() == Module::AnyPointerSize)
|
||||
Dest->setPointerSize(Src->getPointerSize());
|
||||
|
||||
if (Src->getEndianness() != Module::AnyEndianness &&
|
||||
Dest->getEndianness() != Src->getEndianness())
|
||||
std::cerr << "WARNING: Linking two modules of different endianness!\n";
|
||||
if (Dest->getPointerSize() != Src->getPointerSize())
|
||||
if (Src->getPointerSize() != Module::AnyPointerSize &&
|
||||
Dest->getPointerSize() != Src->getPointerSize())
|
||||
std::cerr << "WARNING: Linking two modules of different pointer size!\n";
|
||||
|
||||
// LinkTypes - Go through the symbol table of the Src module and see if any
|
||||
|
@ -761,9 +761,16 @@ static bool LinkAppendingVars(Module *M,
|
||||
// shouldn't be relied on to be consistent.
|
||||
//
|
||||
bool LinkModules(Module *Dest, const Module *Src, std::string *ErrorMsg) {
|
||||
if (Dest->getEndianness() != Src->getEndianness())
|
||||
if (Dest->getEndianness() == Module::AnyEndianness)
|
||||
Dest->setEndianness(Src->getEndianness());
|
||||
if (Dest->getPointerSize() == Module::AnyPointerSize)
|
||||
Dest->setPointerSize(Src->getPointerSize());
|
||||
|
||||
if (Src->getEndianness() != Module::AnyEndianness &&
|
||||
Dest->getEndianness() != Src->getEndianness())
|
||||
std::cerr << "WARNING: Linking two modules of different endianness!\n";
|
||||
if (Dest->getPointerSize() != Src->getPointerSize())
|
||||
if (Src->getPointerSize() != Module::AnyPointerSize &&
|
||||
Dest->getPointerSize() != Src->getPointerSize())
|
||||
std::cerr << "WARNING: Linking two modules of different pointer size!\n";
|
||||
|
||||
// LinkTypes - Go through the symbol table of the Src module and see if any
|
||||
|
Loading…
Reference in New Issue
Block a user