================
@@ -361,8 +367,19 @@ int main(int argc, const char **argv) {
 
   bool HasError = false;
 
+  auto ProcessInput = [&](llvm::StringRef Input) -> llvm::Error {
+    if (!EmitLLVMIR)
+      return Interp->ParseAndExecute(Input);
+    auto PTU = Interp->Parse(Input);
+    if (!PTU)
+      return PTU.takeError();
+    if (PTU->TheModule)
+      PTU->TheModule->print(llvm::outs(), /*AAW=*/nullptr);
----------------
vgvassilev wrote:

This code can probably go inside `Parse` and print conditionally based on the 
action.

https://github.com/llvm/llvm-project/pull/217870
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to