diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2003-09-05 04:46:26 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-09-05 04:46:26 +0000 |
commit | 413ab6655bfe0b1e58d0da6c3f4c3a9833e8a952 (patch) | |
tree | 425b8328fdb502358c6b20cd83f71d844f4860f1 /lib/ExecutionEngine/Interpreter/UserInput.cpp | |
parent | 8df956ccf2da851d4cb2887c5e27ae1ae507e6d8 (diff) |
Remove support for interactive (step finish next) instructions.
Remove printCurrentInstruction, printStackFrame and infoValue
(only used interactively) and other unused methods of Interpreter.
Fold UserInput.cpp containing only callMainFunction() into Interpreter.cpp.
Remove unused Profile flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8359 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/Interpreter/UserInput.cpp')
-rw-r--r-- | lib/ExecutionEngine/Interpreter/UserInput.cpp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/lib/ExecutionEngine/Interpreter/UserInput.cpp b/lib/ExecutionEngine/Interpreter/UserInput.cpp deleted file mode 100644 index 135c990c65..0000000000 --- a/lib/ExecutionEngine/Interpreter/UserInput.cpp +++ /dev/null @@ -1,51 +0,0 @@ -//===-- UserInput.cpp - Interpreter Input Loop support --------------------===// -// -// This file implements the interpreter Input I/O loop. -// -//===----------------------------------------------------------------------===// - -#include "Interpreter.h" -#include "llvm/DerivedTypes.h" -#include "llvm/Function.h" -#include "llvm/Module.h" - -// callMainFunction - This is a nasty gross hack that will dissapear when -// callFunction can parse command line options and stuff for us. -// -bool Interpreter::callMainFunction(const std::string &Name, - const std::vector<std::string> &InputArgv) { - Function *M = getModule().getNamedFunction(Name); - if (M == 0) { - std::cerr << "Could not find function '" << Name << "' in module!\n"; - return 1; - } - const FunctionType *MT = M->getFunctionType(); - - std::vector<GenericValue> Args; - if (MT->getParamTypes().size() >= 2) { - PointerType *SPP = PointerType::get(PointerType::get(Type::SByteTy)); - if (MT->getParamTypes()[1] != SPP) { - CW << "Second argument of '" << Name << "' should have type: '" - << SPP << "'!\n"; - return true; - } - Args.push_back(PTOGV(CreateArgv(InputArgv))); - } - - if (MT->getParamTypes().size() >= 1) { - if (!MT->getParamTypes()[0]->isInteger()) { - std::cout << "First argument of '" << Name << "' should be an integer!\n"; - return true; - } else { - GenericValue GV; GV.UIntVal = InputArgv.size(); - Args.insert(Args.begin(), GV); - } - } - - callFunction(M, Args); // Start executing it... - - // Reset the current frame location to the top of stack - CurFrame = ECStack.size()-1; - - return false; -} |