Commit Graph

4 Commits

Author SHA1 Message Date
Giacomo Vercesi 761e84fc9f Add revng::cantFail
Add the `revng::cantFail` function which allows to wrap functions with
`std::error_code` and check their result. This is analogous to
`llvm::cantFail` for `llvm::Error`.
2025-02-05 10:46:00 +01:00
Giacomo Vercesi 7f0bea6f6a Improve TemporaryFile
This commit adds the following enhancements to `TemporaryFile`:
* Adds TemporaryFile::make to allow catching the error if the temporary
  file creation fails
* Fix the move assignment, as it would leak the original file until shutdown
* Fix the destructor, as it would be called even on a moved object
2023-09-06 15:23:43 +02:00
Alessandro Di Federico 02c69b0421 TemporaryFile: use RemoveFileOnSignal 2022-09-26 18:05:38 +02:00
Alessandro Di Federico f44363f621 Introduce TemporaryFile 2022-03-08 12:25:47 +01:00