================
@@ -373,20 +370,16 @@ Example usage for a project using a compile commands
database:
// 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;
+ ExitOnErr(llvm::createStringError(
+ llvm::inconvertibleErrorCode(), "Failed to create directory '%s': %s",
----------------
ilovepi wrote:
Is inconvertibleErrorCode, the right fit. I guess do you want/need a string
error at all? IIRC there are some error APIs in Error.h that are about file
system errors. `createFileError(...)` I think
https://github.com/llvm/llvm-project/pull/141699
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits