================
@@ -370,9 +378,24 @@ int main(int argc, const char **argv) {
       if (Input == R"(%undo)") {
         if (auto Err = Interp->Undo())
           llvm::logAllUnhandledErrors(std::move(Err), llvm::errs(), "error: ");
+      } else if (Input == R"(%help)") {
+        auto Err =
+            llvm::make_error<llvm::StringError>(help_output, 
std::error_code());
+        llvm::logAllUnhandledErrors(std::move(Err), llvm::errs(), "");
+      } else if (Input == R"(%lib)") {
+        auto Err = llvm::make_error<llvm::StringError>(lib_bad_args,
+                                                       std::error_code());
+        llvm::logAllUnhandledErrors(std::move(Err), llvm::errs(), "error: ");
       } else if (Input.rfind("%lib ", 0) == 0) {
         if (auto Err = Interp->LoadDynamicLibrary(Input.data() + 5))
           llvm::logAllUnhandledErrors(std::move(Err), llvm::errs(), "error: ");
+      } else if (Input[0] == '%') { // make sure this is evaluated last
----------------
DavidSpickett wrote:

I think you can drop the comment now that the bits above make more sense. For 
me as a reader it's clear why this part is where it is.

https://github.com/llvm/llvm-project/pull/150348
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to