mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Add warning when linking modules with disagreeing target properties
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5845 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
61a909a6fd
commit
43a9994c01
@ -469,6 +469,10 @@ static bool LinkFunctionBodies(Module *Dest, const Module *Src,
|
||||
// shouldn't be relied on to be consistent.
|
||||
//
|
||||
bool LinkModules(Module *Dest, const Module *Src, std::string *ErrorMsg) {
|
||||
if (Dest->getEndianness() != Src->getEndianness())
|
||||
std::cerr << "WARNING: Linking two modules of different endianness!\n";
|
||||
if (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
|
||||
// types are named in the src module that are not named in the Dst module.
|
||||
|
@ -469,6 +469,10 @@ static bool LinkFunctionBodies(Module *Dest, const Module *Src,
|
||||
// shouldn't be relied on to be consistent.
|
||||
//
|
||||
bool LinkModules(Module *Dest, const Module *Src, std::string *ErrorMsg) {
|
||||
if (Dest->getEndianness() != Src->getEndianness())
|
||||
std::cerr << "WARNING: Linking two modules of different endianness!\n";
|
||||
if (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
|
||||
// types are named in the src module that are not named in the Dst module.
|
||||
|
@ -469,6 +469,10 @@ static bool LinkFunctionBodies(Module *Dest, const Module *Src,
|
||||
// shouldn't be relied on to be consistent.
|
||||
//
|
||||
bool LinkModules(Module *Dest, const Module *Src, std::string *ErrorMsg) {
|
||||
if (Dest->getEndianness() != Src->getEndianness())
|
||||
std::cerr << "WARNING: Linking two modules of different endianness!\n";
|
||||
if (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
|
||||
// types are named in the src module that are not named in the Dst module.
|
||||
|
Loading…
Reference in New Issue
Block a user