util: Add stub unit tests for the call types in the m5 utility.
[gem5.git] / util / m5 / src / m5.cc
index f8c1101f09b91e163bbe5a94b86e57d858e36cdd..0e86817e18ce1c2b3672abc1c5a6dd412bfb9103 100644 (file)
@@ -53,9 +53,11 @@ main(int argc, const char *argv[])
     if (!args.size())
         usage();
 
-    const DispatchTable &dt = CallType::detect(args).getDispatch();
+    CallType *ct = CallType::detect(args);
+    if (!ct)
+        usage();
 
-    if (!Command::run(dt, args))
+    if (!Command::run(ct->getDispatch(), args))
         usage();
 
     exit(0);