clang has a mangling extension for block invocations and currently lldb does not handle it correctly.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lldb/source/Core/Mangled.cpp | ||
---|---|---|
99 | StringRef has a startswith. That might be easier to read. |
lldb/include/lldb/Core/Mangled.h | ||
---|---|---|
264 | Doxygen comment? | |
lldb/source/Core/Mangled.cpp | ||
99 | Agreed. There should be no performance penalty for using startswith over this in an optimized build. | |
102 | Is ___Z really only used for blocks or is it used for other clang extensions, too? | |
104 | Just FYI, this will create a merge conflict with swift-lldb. You might want to think about how to resolve it ahead of committing. | |
106 | 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. | |
310 | If it's equivalent I'd find | |
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h | ||
104 | That's a good idea anyway :-) |
Updating based on comments
- Adding documentation
- using startswith(...)
- Updating initialization to use = instead of {}
lldb/source/Core/Mangled.cpp | ||
---|---|---|
36 | I was going to say, the function name doesn't make sense any more, but really we probably don't need this function at all, right? | |
106 | I think IsCPPMangledName should be called IsMangledName and every language plugin should define one. The fact that you forgot to make the same bugfix in CPlusPlusLanguage::IsCPPMangledName should be motivation enough to not implement the same functionality in two places :-) |
Doxygen comment?