[Orc][Kaleidoscope] Update the MainLoop code of the orc/kaleidoscope tutorials
[oota-llvm.git] / examples / Kaleidoscope / Orc / initial / toy.cpp
index c10f99bccc83d2f46c1abd2ae75ff577e125aca8..ae0d4ad33da3a4059b899f2db11adfae7a3bded2 100644 (file)
@@ -1254,16 +1254,16 @@ static void MainLoop() {
   SessionContext S(getGlobalContext());
 
   while (1) {
-#ifndef MINIMAL_STDERR_OUTPUT
-    std::cerr << "ready> ";
-#endif
     switch (CurTok) {
     case tok_eof:    return;
-    case ';':        getNextToken(); break;  // ignore top-level semicolons.
+    case ';':        getNextToken(); continue;  // ignore top-level semicolons.
     case tok_def:    HandleDefinition(S, J); break;
     case tok_extern: HandleExtern(S); break;
     default:         HandleTopLevelExpression(S, J); break;
     }
+#ifndef MINIMAL_STDERR_OUTPUT
+    std::cerr << "ready> ";
+#endif
   }
 }