[llvm-commits] CVS: llvm/tools/lto/Makefile lto.cpp

Chris Lattner sabre at nondot.org
Sun May 6 02:32:36 PDT 2007



Changes in directory llvm/tools/lto:

Makefile updated: 1.9 -> 1.10
lto.cpp updated: 1.39 -> 1.40
---
Log message:

switch tools to bitcode from bytecode


---
Diffs of the changes:  (+5 -22)

 Makefile |    2 +-
 lto.cpp  |   25 ++++---------------------
 2 files changed, 5 insertions(+), 22 deletions(-)


Index: llvm/tools/lto/Makefile
diff -u llvm/tools/lto/Makefile:1.9 llvm/tools/lto/Makefile:1.10
--- llvm/tools/lto/Makefile:1.9	Sat May  5 23:49:55 2007
+++ llvm/tools/lto/Makefile	Sun May  6 04:32:02 2007
@@ -24,7 +24,7 @@
   BUILD_ARCHIVE = 1
 endif
 
-LINK_COMPONENTS := $(TARGETS_TO_BUILD) ipo scalaropts linker bcreader bcwriter bitreader bitwriter
+LINK_COMPONENTS := $(TARGETS_TO_BUILD) ipo scalaropts linker bitreader bitwriter
 
 include $(LEVEL)/Makefile.common
 


Index: llvm/tools/lto/lto.cpp
diff -u llvm/tools/lto/lto.cpp:1.39 llvm/tools/lto/lto.cpp:1.40
--- llvm/tools/lto/lto.cpp:1.39	Sat May  5 23:49:55 2007
+++ llvm/tools/lto/lto.cpp	Sun May  6 04:32:02 2007
@@ -17,9 +17,8 @@
 #include "llvm/Linker.h"
 #include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
+#include "llvm/ModuleProvider.h"
 #include "llvm/Bitcode/ReaderWriter.h"
-#include "llvm/Bytecode/Reader.h"
-#include "llvm/Bytecode/Writer.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/FileUtilities.h"
 #include "llvm/Support/SystemUtils.h"
@@ -40,7 +39,6 @@
 #include "llvm/Transforms/Scalar.h"
 #include "llvm/Analysis/LoadValueNumbering.h"
 #include "llvm/Support/MathExtras.h"
-#include "llvm/Support/Streams.h"
 #include "llvm/LinkTimeOptimizer.h"
 #include <fstream>
 #include <ostream>
@@ -53,8 +51,6 @@
   return l;
 }
 
-static bool Bitcode = false;
-
 /// If symbol is not used then make it internal and let optimizer takes 
 /// care of it.
 void LLVMSymbol::mayBeNotUsed() { 
@@ -121,16 +117,13 @@
   NameToModuleMap::iterator pos = allModules.find(InputFilename.c_str());
   if (pos != allModules.end())
     m = allModules[InputFilename.c_str()];
-  else if (Bitcode) {
+  else {
     if (MemoryBuffer *Buffer
         = MemoryBuffer::getFile(&InputFilename[0], InputFilename.size())) {
       m = ParseBitcodeFile(Buffer);
       delete Buffer;
     }
     allModules[InputFilename.c_str()] = m;
-  } else {
-    m = ParseBytecodeFile(InputFilename);
-    allModules[InputFilename.c_str()] = m;
   }
   return m;
 }
@@ -385,12 +378,7 @@
     std::string tempFileName(FinalOutputPath.c_str());
     tempFileName += "0.bc";
     std::ofstream Out(tempFileName.c_str(), io_mode);
-    if (Bitcode) {
-      WriteBitcodeToFile(bigOne, Out);
-    } else {
-      OStream L(Out);
-      WriteBytecodeToFile(bigOne, L);
-    }
+    WriteBitcodeToFile(bigOne, Out);
   }
 
   // Strip leading underscore because it was added to match names
@@ -443,12 +431,7 @@
     std::string tempFileName(FinalOutputPath.c_str());
     tempFileName += "1.bc";
     std::ofstream Out(tempFileName.c_str(), io_mode);
-    if (Bitcode) {
-      WriteBitcodeToFile(bigOne, Out);
-    } else {
-      OStream L(Out);
-      WriteBytecodeToFile(bigOne, L);
-    }
+    WriteBitcodeToFile(bigOne, Out);
   }
 
   targetTriple = bigOne->getTargetTriple();






More information about the llvm-commits mailing list