[llvm] [llvm-profdata] Emit warning when counter value is greater than 2^56. (PR #69513)
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 23 14:51:18 PDT 2023
================
@@ -202,11 +202,13 @@ class InstrProfReader {
/// instrprof file.
static Expected<std::unique_ptr<InstrProfReader>>
create(const Twine &Path, vfs::FileSystem &FS,
- const InstrProfCorrelator *Correlator = nullptr);
+ const InstrProfCorrelator *Correlator = nullptr,
+ std::optional<std::function<void(Error)>> MaybeWarnFn = {});
----------------
aeubanks wrote:
as nice as it is to explicitly state that this can be null, `std::function` can already be null and that's widely used in C++, so I'd just make this a `std::function<>` and use its bool conversion to check if it has a value
https://github.com/llvm/llvm-project/pull/69513
More information about the llvm-commits
mailing list