llvm.org GIT mirror llvm / 43a9994
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 Chris Lattner 17 years ago
3 changed file(s) with 12 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
468468 // shouldn't be relied on to be consistent.
469469 //
470470 bool LinkModules(Module *Dest, const Module *Src, std::string *ErrorMsg) {
471 if (Dest->getEndianness() != Src->getEndianness())
472 std::cerr << "WARNING: Linking two modules of different endianness!\n";
473 if (Dest->getPointerSize() != Src->getPointerSize())
474 std::cerr << "WARNING: Linking two modules of different pointer size!\n";
471475
472476 // LinkTypes - Go through the symbol table of the Src module and see if any
473477 // types are named in the src module that are not named in the Dst module.
468468 // shouldn't be relied on to be consistent.
469469 //
470470 bool LinkModules(Module *Dest, const Module *Src, std::string *ErrorMsg) {
471 if (Dest->getEndianness() != Src->getEndianness())
472 std::cerr << "WARNING: Linking two modules of different endianness!\n";
473 if (Dest->getPointerSize() != Src->getPointerSize())
474 std::cerr << "WARNING: Linking two modules of different pointer size!\n";
471475
472476 // LinkTypes - Go through the symbol table of the Src module and see if any
473477 // types are named in the src module that are not named in the Dst module.
468468 // shouldn't be relied on to be consistent.
469469 //
470470 bool LinkModules(Module *Dest, const Module *Src, std::string *ErrorMsg) {
471 if (Dest->getEndianness() != Src->getEndianness())
472 std::cerr << "WARNING: Linking two modules of different endianness!\n";
473 if (Dest->getPointerSize() != Src->getPointerSize())
474 std::cerr << "WARNING: Linking two modules of different pointer size!\n";
471475
472476 // LinkTypes - Go through the symbol table of the Src module and see if any
473477 // types are named in the src module that are not named in the Dst module.