[llvm-commits] CVS: llvm/tools/link/link.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Aug 28 11:26:01 PDT 2003


Changes in directory llvm/tools/link:

link.cpp updated: 1.26 -> 1.27

---
Log message:

Reorder #includes
Make sure that we veryify the result before writing it out!


---
Diffs of the changes:

Index: llvm/tools/link/link.cpp
diff -u llvm/tools/link/link.cpp:1.26 llvm/tools/link/link.cpp:1.27
--- llvm/tools/link/link.cpp:1.26	Fri Jun 13 11:10:26 2003
+++ llvm/tools/link/link.cpp	Thu Aug 28 11:25:34 2003
@@ -6,10 +6,11 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Transforms/Utils/Linker.h"
+#include "llvm/Module.h"
+#include "llvm/Analysis/Verifier.h"
 #include "llvm/Bytecode/Reader.h"
 #include "llvm/Bytecode/Writer.h"
-#include "llvm/Module.h"
+#include "llvm/Transforms/Utils/Linker.h"
 #include "Support/CommandLine.h"
 #include "Support/Signals.h"
 #include <fstream>
@@ -123,6 +124,11 @@
     // Make sure that the Out file gets unlink'd from the disk if we get a
     // SIGINT
     RemoveFileOnSignal(OutputFilename);
+  }
+
+  if (verifyModule(*Composite.get())) {
+    std::cerr << argv[0] << ": linked module is broken!\n";
+    return 1;
   }
 
   if (Verbose) std::cerr << "Writing bytecode...\n";





More information about the llvm-commits mailing list