[Lldb-commits] [PATCH] D49612: Use LLVM's new ItaniumPartialDemangler in LLDB

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 23 03:49:32 PDT 2018

labath added a comment.

In https://reviews.llvm.org/D49612#1171395, @sgraenitz wrote:

> > That's fine. It just needs to be able to demangle itanium names when running on an MSVC platform.
> IIUC `cstring_mangling_scheme()` should return `eManglingSchemeItanium` in this case and switch to the case label without the `#if defined(_MSC_VER)`.

Yes, and that's correct.

But I am talking about cmake code here. `option(LLDB_USE_LLVM_DEMANGLER "Use llvm's new partial demangler" ON)` is in an `!MSVC` block, so the user will not be able to choose which demangler to use there. My point was simply to move that option out of that block so that it is available on msvc builds as well. (That is if the new demangler works with msvc, but I don't see a reason why it shouldn't.)

Combined with the other suggestion of making this a tri-valued setting, you could have a single setting with values "system", "legacy", "new" or whatever you think best describes them, and then do something like  `if (MSVC AND ${setting} == "system") message(ERROR "System itanium demangler not available on MSVC")`.


More information about the lldb-commits mailing list