[llvm-commits] [hlvm] r38148 - in /hlvm/trunk/tools/hlvm: SConscript hlvm.cpp

Reid Spencer reid at x10sys.com
Sat Jul 7 17:00:28 PDT 2007


Author: reid
Date: Sat Jul  7 19:00:28 2007
New Revision: 38148

URL: http://llvm.org/viewvc/llvm-project?rev=38148&view=rev
Log:
Convert the hlvm tool to work with the new Runtime library. This minimizes
"hlvm" to only providing "main" and also cuts down the number of libraries
needed to be linked.

Modified:
    hlvm/trunk/tools/hlvm/SConscript
    hlvm/trunk/tools/hlvm/hlvm.cpp

Modified: hlvm/trunk/tools/hlvm/SConscript
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/tools/hlvm/SConscript?rev=38148&r1=38147&r2=38148&view=diff

==============================================================================
--- hlvm/trunk/tools/hlvm/SConscript (original)
+++ hlvm/trunk/tools/hlvm/SConscript Sat Jul  7 19:00:28 2007
@@ -26,14 +26,12 @@
 env.BytecodeArchive('hlvm.bca',hlvm.GetAllCXXFiles(env))
 env.Program('hlvm', hlvm.GetAllCXXFiles(env),
   LIBS=[
-    'HLVMXMLReader',
-    'HLVMXMLWriter',
-    'HLVMAST',
+    'HLVMRuntime',
     'HLVMBase',
-    'xml2',
     'LLVMSupport',
     'LLVMSystem',
     'apr-1',
+    'aprutil-1',
     'stdc++'
   ],
 )

Modified: hlvm/trunk/tools/hlvm/hlvm.cpp
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/tools/hlvm/hlvm.cpp?rev=38148&r1=38147&r2=38148&view=diff

==============================================================================
--- hlvm/trunk/tools/hlvm/hlvm.cpp (original)
+++ hlvm/trunk/tools/hlvm/hlvm.cpp Sat Jul  7 19:00:28 2007
@@ -27,31 +27,9 @@
 /// @brief Implements the main program for the HLVM Virtual Machine
 //===----------------------------------------------------------------------===//
 
-#include <hlvm/Base/Memory.h>
-#include <hlvm/Reader/XML/XMLReader.h>
-#include <hlvm/Writer/XML/XMLWriter.h>
-#include <llvm/Support/CommandLine.h>
-#include <llvm/System/Signals.h>
-#include <fstream>
-#include <iostream>
-
-using namespace llvm;
-using namespace hlvm;
-static cl::opt<std::string>
-ProgramToRun(cl::Positional, cl::desc("URI Of Program To Run"));
+#include <hlvm/Runtime/Main.h>
 
 int main(int argc, char**argv) 
 {
-  try {
-    initialize(argc,argv);
-    cl::ParseCommandLineOptions(argc, argv, 
-      "hlvm: High Level Virtual Machine\n");
-
-    std::cout << "Unfortunately, the hlvm virtual machine isn't implemented.\n";
-  } catch (const std::string& msg) {
-    std::cerr << argv[0] << ": " << msg << "\n";
-  } catch (...) {
-    std::cerr << argv[0] << ": Unexpected unknown exception occurred.\n";
-  }
-  return 1;
+  return hlvm_runtime_main(argc,argv);
 }





More information about the llvm-commits mailing list