瀏覽代碼

Change main flow to tolerate mixup of verbose stream and emission stream. It was originally assumed to be too messy and useless, but this jugement is best left to the user.

Signed-off-by: Vivien Oddou <[email protected]>
Vivien Oddou 2 年之前
父節點
當前提交
189bc37cf4
共有 1 個文件被更改,包括 2 次插入11 次删除
  1. 2 11
      src/AzslcMain.cpp

+ 2 - 11
src/AzslcMain.cpp

@@ -650,8 +650,6 @@ int main(int argc, const char* argv[])
             // intermediate state validation
             // intermediate state validation
             ir.Validate();
             ir.Validate();
 
 
-            bool doEmission = true;
-
             if (stripUnusedSrgs)
             if (stripUnusedSrgs)
             {
             {
                 ir.RemoveUnusedSrgs();
                 ir.RemoveUnusedSrgs();
@@ -660,7 +658,6 @@ int main(int argc, const char* argv[])
             if (dumpsym)
             if (dumpsym)
             {
             {
                 DumpSymbols(ir);
                 DumpSymbols(ir);
-                doEmission = false;
             }
             }
             else if (!visitName.empty())
             else if (!visitName.empty())
             {
             {
@@ -675,16 +672,10 @@ int main(int argc, const char* argv[])
                     visitOptions |= possibleOption.first ? possibleOption.second : RE::EnumType(0);
                     visitOptions |= possibleOption.first ? possibleOption.second : RE::EnumType(0);
                 }
                 }
                 PrintVisitSymbol(ir, visitName, visitOptions);
                 PrintVisitSymbol(ir, visitName, visitOptions);
-                doEmission = false;
             }
             }
-            else
-            {
-                bool checkerFlagsPresent = semantic || verbose; // or --syntax but we already exited by now.
-                doEmission = !checkerFlagsPresent;
-            }
-
-            if (doEmission)
+            else if (!semantic)  // do emission
             {
             {
+                verboseCout << "--Emission/Reflection--\n";
                 std::ofstream mainOutFile;
                 std::ofstream mainOutFile;
 
 
                 if (useOutputFile)
                 if (useOutputFile)