[PATCH] D27913: [XRay] Fix assertion failure on empty machine basic blocks (PR 31424)
Chandler Carruth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 19 00:52:54 PST 2016
chandlerc accepted this revision.
chandlerc added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: lib/CodeGen/XRayInstrumentation.cpp:135
+ auto MBI =
+ std::find_if(MF.begin(), MF.end(),
+ [&](const MachineBasicBlock &MBB) { return !MBB.empty(); });
----------------
You can use just `find_if(MF, ...)` -- we have a range based version in the `llvm` namespace.
https://reviews.llvm.org/D27913
More information about the llvm-commits
mailing list