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

Chris Lattner sabre at nondot.org
Sun May 6 02:31:03 PDT 2007



Changes in directory llvm/tools/llvm-as:

Makefile updated: 1.20 -> 1.21
llvm-as.cpp updated: 1.52 -> 1.53
---
Log message:

switch tools to bitcode instead of bytecode


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

 Makefile    |    2 +-
 llvm-as.cpp |   23 ++++-------------------
 2 files changed, 5 insertions(+), 20 deletions(-)


Index: llvm/tools/llvm-as/Makefile
diff -u llvm/tools/llvm-as/Makefile:1.20 llvm/tools/llvm-as/Makefile:1.21
--- llvm/tools/llvm-as/Makefile:1.20	Sun Apr 22 01:31:35 2007
+++ llvm/tools/llvm-as/Makefile	Sun May  6 04:29:57 2007
@@ -9,7 +9,7 @@
 
 LEVEL = ../..
 TOOLNAME = llvm-as
-LINK_COMPONENTS := asmparser bcwriter bitwriter
+LINK_COMPONENTS := asmparser bitwriter
 REQUIRES_EH := 1
 
 include $(LEVEL)/Makefile.common


Index: llvm/tools/llvm-as/llvm-as.cpp
diff -u llvm/tools/llvm-as/llvm-as.cpp:1.52 llvm/tools/llvm-as/llvm-as.cpp:1.53
--- llvm/tools/llvm-as/llvm-as.cpp:1.52	Sun Apr 22 01:28:58 2007
+++ llvm/tools/llvm-as/llvm-as.cpp	Sun May  6 04:29:57 2007
@@ -9,15 +9,14 @@
 //
 //  This utility may be invoked in the following manner:
 //   llvm-as --help         - Output information about command line switches
-//   llvm-as [options]      - Read LLVM asm from stdin, write bytecode to stdout
-//   llvm-as [options] x.ll - Read LLVM asm from the x.ll file, write bytecode
+//   llvm-as [options]      - Read LLVM asm from stdin, write bitcode to stdout
+//   llvm-as [options] x.ll - Read LLVM asm from the x.ll file, write bitcode
 //                            to the x.bc file.
 //
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Module.h"
 #include "llvm/Assembly/Parser.h"
-#include "llvm/Bytecode/Writer.h"
 #include "llvm/Analysis/Verifier.h"
 #include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/Support/CommandLine.h"
@@ -44,17 +43,9 @@
 DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden);
 
 static cl::opt<bool>
-NoCompress("disable-compression", cl::init(true),
-           cl::desc("Don't compress the generated bytecode"));
-
-static cl::opt<bool>
 DisableVerify("disable-verify", cl::Hidden,
               cl::desc("Do not run verifier on input LLVM (dangerous!)"));
 
-static cl::opt<bool>
-EnableBitcode("bitcode", cl::desc("Emit bitcode"));
-
-
 int main(int argc, char **argv) {
   llvm_shutdown_obj X;  // Call llvm_shutdown() on exit.
   cl::ParseCommandLineOptions(argc, argv, " llvm .ll -> .bc assembler\n");
@@ -134,14 +125,8 @@
       return 1;
     }
 
-    if (Force || !CheckBytecodeOutputToConsole(Out,true)) {
-      if (EnableBitcode) {
-        WriteBitcodeToFile(M.get(), *Out);
-      } else {
-        OStream L(*Out);
-        WriteBytecodeToFile(M.get(), L, !NoCompress);
-      }
-    }
+    if (Force || !CheckBytecodeOutputToConsole(Out,true))
+      WriteBitcodeToFile(M.get(), *Out);
   } catch (const std::string& msg) {
     cerr << argv[0] << ": " << msg << "\n";
     exitCode = 1;






More information about the llvm-commits mailing list