Add support for isnan
[oota-llvm.git] / lib / ExecutionEngine / Interpreter / UserInput.cpp
index 91addb6dd68db895c483a20f83280c2f26d112f4..f0975a72d8fcccf65d39e2d0e716401c9f0fe5f6 100644 (file)
@@ -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,13 +272,12 @@ 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:
-    if (!MT->getParamTypes()[0]->isIntegral()) {
-      cout << "First argument of '" << Name << "' should be integral!\n";
+    if (!MT->getParamTypes()[0]->isInteger()) {
+      cout << "First argument of '" << Name << "' should be an integer!\n";
       return true;
     } else {
       GenericValue GV; GV.UIntVal = InputArgv.size();