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

Chris Lattner sabre at nondot.org
Sat May 5 22:40:59 PDT 2007



Changes in directory llvm/tools/llvm-upgrade:

Makefile updated: 1.6 -> 1.7
llvm-upgrade.cpp updated: 1.8 -> 1.9
---
Log message:

Remove the -emit-bytecode option.  Noone in the llvm tree uses it, and this
keeps llvm-upgrade a simple "source to source" tool.


---
Diffs of the changes:  (+3 -13)

 Makefile         |    2 +-
 llvm-upgrade.cpp |   14 ++------------
 2 files changed, 3 insertions(+), 13 deletions(-)


Index: llvm/tools/llvm-upgrade/Makefile
diff -u llvm/tools/llvm-upgrade/Makefile:1.6 llvm/tools/llvm-upgrade/Makefile:1.7
--- llvm/tools/llvm-upgrade/Makefile:1.6	Fri Jan 26 02:19:09 2007
+++ llvm/tools/llvm-upgrade/Makefile	Sun May  6 00:40:41 2007
@@ -9,7 +9,7 @@
 
 LEVEL = ../..
 TOOLNAME = llvm-upgrade
-LINK_COMPONENTS := BCWriter Core support system
+LINK_COMPONENTS := Core support system
 REQUIRES_EH := 1
 
 include $(LEVEL)/Makefile.common


Index: llvm/tools/llvm-upgrade/llvm-upgrade.cpp
diff -u llvm/tools/llvm-upgrade/llvm-upgrade.cpp:1.8 llvm/tools/llvm-upgrade/llvm-upgrade.cpp:1.9
--- llvm/tools/llvm-upgrade/llvm-upgrade.cpp:1.8	Fri Jan 26 02:19:09 2007
+++ llvm/tools/llvm-upgrade/llvm-upgrade.cpp	Sun May  6 00:40:41 2007
@@ -21,7 +21,6 @@
 
 #include "UpgradeInternals.h"
 #include "llvm/Module.h"
-#include "llvm/Bytecode/Writer.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/Streams.h"
@@ -50,10 +49,6 @@
 Debug("debug-upgrade-yacc", cl::desc("Print debug output from yacc parser"),
       cl::Hidden, cl::init(false));
 
-static cl::opt<bool>
-EmitByteCode("emit-bytecode", cl::desc("Emit bytecode instead of assembly"),
-    cl::init(false));
-
 int main(int argc, char **argv) {
   llvm_shutdown_obj X;  // Call llvm_shutdown() on exit.
   cl::ParseCommandLineOptions(argc, argv, " llvm .ll -> .bc assembler\n");
@@ -128,17 +123,12 @@
     Module *M = UpgradeAssembly(InputFilename, *In, Debug, AddAttrs);
     if (!M) {
       cerr << argv[0] << ": No module returned from assembly parsing\n";
-      if (!EmitByteCode)
-        *Out << argv[0] << ": parse failed.";
+      *Out << argv[0] << ": parse failed.";
       exit(1);
     }
 
     // Finally, print the module on the output stream.
-    if (EmitByteCode) {
-      OStream OS(*Out);
-      WriteBytecodeToFile(M, OS);
-    } else
-      M->print(Out);
+    M->print(Out);
 
   } catch (const std::string& caught_message) {
     cerr << argv[0] << ": " << caught_message << "\n";






More information about the llvm-commits mailing list