diff options
author | Chris Lattner <sabre@nondot.org> | 2002-11-07 19:29:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-11-07 19:29:31 +0000 |
commit | ab2dea568729ac68af0fec982756ca8d491f913b (patch) | |
tree | 7b777962410e318c81717574742878a6d90f04a2 /lib/ExecutionEngine/Interpreter/UserInput.cpp | |
parent | 1cc1ad7171921a9704d8a354b87bbd82b6c4ab34 (diff) |
Make command line arguments setup be endian correct!!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4605 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/Interpreter/UserInput.cpp')
-rw-r--r-- | lib/ExecutionEngine/Interpreter/UserInput.cpp | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/lib/ExecutionEngine/Interpreter/UserInput.cpp b/lib/ExecutionEngine/Interpreter/UserInput.cpp index 4ef7fdcacf..f0975a72d8 100644 --- a/lib/ExecutionEngine/Interpreter/UserInput.cpp +++ b/lib/ExecutionEngine/Interpreter/UserInput.cpp @@ -238,23 +238,6 @@ bool Interpreter::callMethod(const string &Name) { return false; } -static void *CreateArgv(const std::vector<string> &InputArgv) { - // Pointers are 64 bits... - uint64_t *Result = new PointerTy[InputArgv.size()+1]; - - for (unsigned i = 0; i < InputArgv.size(); ++i) { - unsigned Size = InputArgv[i].size()+1; - char *Dest = new char[Size]; - copy(InputArgv[i].begin(), InputArgv[i].end(), Dest); - Dest[Size-1] = 0; - Result[i] = (PointerTy)Dest; - } - - Result[InputArgv.size()] = 0; - return Result; -} - - // callMainMethod - This is a nasty gross hack that will dissapear when // callMethod can parse command line options and stuff for us. // @@ -289,8 +272,7 @@ bool Interpreter::callMainMethod(const string &Name, return true; } - GenericValue GV; GV.PointerVal = (uint64_t)CreateArgv(InputArgv); - Args.push_back(GV); + Args.push_back(CreateArgv(InputArgv)); } // fallthrough case 1: |