================
@@ -371,22 +368,15 @@ Example usage for a project using a compile commands 
database:
   sortUsrToInfo(USRToInfo);
 
   // Ensure the root output directory exists.
-  if (std::error_code Err = llvm::sys::fs::create_directories(OutDirectory);
-      Err != std::error_code()) {
-    llvm::errs() << "Failed to create directory '" << OutDirectory << "'\n";
-    return 1;
+  if (std::error_code Err = llvm::sys::fs::create_directories(OutDirectory)) {
+    ExitOnErr(llvm::createFileError(OutDirectory, Err));
   }
 
   // Run the generator.
   llvm::outs() << "Generating docs...\n";
-  if (auto Err =
-          G->get()->generateDocs(OutDirectory, std::move(USRToInfo), CDCtx)) {
-    llvm::errs() << toString(std::move(Err)) << "\n";
-    return 1;
-  }
-
+  ExitOnErr(G->generateDocs(OutDirectory, std::move(USRToInfo), CDCtx));
   llvm::outs() << "Generating assets for docs...\n";
-  Err = G->get()->createResources(CDCtx);
+  Err = G->createResources(CDCtx);
----------------
snarang181 wrote:

I will try this out. 

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

Reply via email to