[llvm] [memprof] Add YAML read/write support to llvm-profdata (PR #118915)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 6 16:55:52 PST 2024
================
@@ -747,7 +747,16 @@ loadInput(const WeightedFile &Input, SymbolRemapper *Remapper,
Filename);
};
- WC->Writer.addMemProfData(Reader->takeMemProfData(), MemProfError);
+ auto MemProfData = Reader->takeMemProfData();
+
+ // Check for the empty input in case the YAML file is invalid.
+ if (MemProfData.Records.empty()) {
+ WC->Errors.emplace_back(
+ make_error<StringError>("The profile is empty.", std::error_code()),
----------------
kazutakahirata wrote:
Done.
https://github.com/llvm/llvm-project/pull/118915
More information about the llvm-commits
mailing list