[PATCH] D124490: [InstrProf] Minimal Block Coverage
Ellis Hoag via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 3 16:08:26 PDT 2022
ellis added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/BlockCoverageInference.cpp:179
+ // This is the first node on the path, return its neighbor.
+ assert(Neighbors.size() == 1);
+ return Neighbors.front();
----------------
spupyrev wrote:
> I have seen in some places assertions of type
> ```
> assert(condition && "readable text message");
> ```
> Is this optional or the accepted style?
I don't know if this is optional or not, so I'm open to either way.
I don't expect to ever hit this assert unless there is a bug, so a user should not encounter this assert. If the assert is hit, then we will need to look at and understand the source anyway and I'm not sure how much added value we get from a readable message here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124490/new/
https://reviews.llvm.org/D124490
More information about the llvm-commits
mailing list