Implement global variables. Struct and Pointer initializers are not implemented yet though

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@818 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2001-10-15 05:51:48 +00:00
parent 8d2de8a82c
commit 2e42d3a306
6 changed files with 254 additions and 43 deletions
+2 -5
View File
@@ -9,7 +9,6 @@
#include "Interpreter.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Bytecode/Reader.h"
cl::String InputFilename("" , "Input filename", cl::NoFlags, "-");
cl::String MainFunction ("f" , "Function to execute", cl::NoFlags, "main");
@@ -21,10 +20,8 @@ cl::Flag ProfileMode ("profile", "Enable Profiling [unimp]");
// Interpreter ctor - Initialize stuff
//
Interpreter::Interpreter() : ExitCode(0), Profile(ProfileMode), CurFrame(-1) {
CurMod = ParseBytecodeFile(InputFilename);
if (CurMod == 0) {
cout << "Error parsing '" << InputFilename << "': No module loaded.\n";
}
CurMod = 0;
loadModule(InputFilename);
// Initialize the "backend"
initializeExecutionEngine();