[llvm] Early exit llvm-bolt when coming across empty data files (PR #176859)

Paschalis Mpeis via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 21 03:32:17 PST 2026


https://github.com/paschalis-mpeis commented:

Hey @yashssh,

Thanks for adding a test file. Overall, I welcome user-friendliness in BOLT. 🙏 

IIUC, the previous logic was: if `ParsingBuf` is not empty, then something may have gone wrong during `parse()`.

So what we might need to check is whether the input file was empty to begin with, or had no useful data in it at all. Was your case not handled [earlier](https://github.com/llvm/llvm-project/blob/1e8c7cfc490beebc27d5535df5545dc23d2cd6c3/bolt/lib/Profile/DataReader.cpp#L1163)? Maybe we should improve that heuristic?

Please wait for @aaupov to weight in.

https://github.com/llvm/llvm-project/pull/176859


More information about the llvm-commits mailing list