werat added inline comments.
================ Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2464 + const char *qn = die.GetQualifiedName(s); + if (strncmp(sc, qn, strlen(sc))) ---------------- Can `GetQualifiedName` return `NULL` string? ================ Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2464-2465 + const char *qn = die.GetQualifiedName(s); + if (strncmp(sc, qn, strlen(sc))) + return true; ---------------- werat wrote: > Can `GetQualifiedName` return `NULL` string? We can skip this check altogether if the `scope` is empty. ================ Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2465 + const char *qn = die.GetQualifiedName(s); + if (strncmp(sc, qn, strlen(sc))) + return true; ---------------- There's no need to calculate length on every iteration. Also you can make `sc` an `llvm::StringRef` and do something like `StringRef(s).startswith(sc)`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114627/new/ https://reviews.llvm.org/D114627 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits