Enhancements to pass argc & argv to main if required
[oota-llvm.git] / lib / ExecutionEngine / Interpreter / Execution.cpp
index 315b9e8fb4a1623193b0dd7b63ad3f1705de1fda..b8cb4909342a29b3b940a63d46b0b560bc9d51f0 100644 (file)
@@ -777,6 +777,8 @@ void Interpreter::callMethod(Method *M, const vector<GenericValue> &ArgVals) {
 
 
   // Run through the method arguments and initialize their values...
+  assert(ArgVals.size() == M->getArgumentList().size() &&
+         "Invalid number of values passed to method invocation!");
   unsigned i = 0;
   for (Method::ArgumentListType::iterator MI = M->getArgumentList().begin(),
         ME = M->getArgumentList().end(); MI != ME; ++MI, ++i) {