[llvm] [llvm-extract] support unnamed bb. (PR #134974)
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 9 15:43:24 PDT 2025
================
@@ -355,9 +358,25 @@ int main(int argc, char **argv) {
for (StringRef BBName : P.second) {
// The function has been materialized, so add its matching basic blocks
// to the block extractor list, or fail if a name is not found.
+#ifndef NDEBUG
auto Res = llvm::find_if(*P.first, [&](const BasicBlock &BB) {
- return BB.getName() == BBName;
+ return BB.getNameOrAsOperand() == BBName;
----------------
aeubanks wrote:
we should make `getNameOrAsOperand()` available in non-debug builds as well to avoid the duplicated logic here
https://github.com/llvm/llvm-project/pull/134974
More information about the llvm-commits
mailing list