[llvm-commits] CVS: llvm/lib/Transforms/Utils/Linker.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Apr 22 14:14:00 PDT 2003


Changes in directory llvm/lib/Transforms/Utils:

Linker.cpp updated: 1.40 -> 1.41

---
Log message:

Add warning when linking modules with disagreeing target properties


---
Diffs of the changes:

Index: llvm/lib/Transforms/Utils/Linker.cpp
diff -u llvm/lib/Transforms/Utils/Linker.cpp:1.40 llvm/lib/Transforms/Utils/Linker.cpp:1.41
--- llvm/lib/Transforms/Utils/Linker.cpp:1.40	Mon Apr 21 16:15:04 2003
+++ llvm/lib/Transforms/Utils/Linker.cpp	Tue Apr 22 14:13:20 2003
@@ -469,6 +469,10 @@
 // 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.





More information about the llvm-commits mailing list