shafik added inline comments.
================ Comment at: lldb/source/Core/Mangled.cpp:99 + + if (s.size() >= 2 && (s[0] == '_' && s[1] == 'Z')) + return Mangled::eManglingSchemeItanium; ---------------- aprantl wrote: > jingham wrote: > > StringRef has a startswith. That might be easier to read. > Agreed. There should be no performance penalty for using startswith over this > in an optimized build. Great catch! ================ Comment at: lldb/source/Core/Mangled.cpp:102 + + // ___Z is a clang extension of block invocations + if (s.size() >= 4 && s[0] == '_' && s[1] == '_' && s[2] == '_' && s[3] == 'Z') ---------------- aprantl wrote: > Is `___Z` really only used for blocks or is it used for other clang > extensions, too? This is solely for block invocations. ================ Comment at: lldb/source/Core/Mangled.cpp:104 + if (s.size() >= 4 && s[0] == '_' && s[1] == '_' && s[2] == '_' && s[3] == 'Z') + return Mangled::eManglingSchemeItanium; + ---------------- aprantl wrote: > Just FYI, this will create a merge conflict with swift-lldb. You might want > to think about how to resolve it ahead of committing. It does not look too bad. ================ Comment at: lldb/source/Core/Mangled.cpp:106 + + return Mangled::eManglingSchemeNone; +} ---------------- aprantl wrote: > You don't need to fix this all at once, but I think it would be even better > if this function did something like > ``` > for each language plugin { > if (mangling_scheme = plugin.isMangledName(...) > ... > } > ``` > > I.e., the plugins should be the ones that know about the mangling details. There is an old comment akin to that in `IsCPPMangledName`. I did not want to stray too far off into refactoring in this PR. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69738/new/ https://reviews.llvm.org/D69738 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits