[Lldb-commits] [PATCH] D69820: [Symbol] Add TypeSystem::GetClassName
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 13 23:56:06 PST 2019
teemperor added a comment.
Some minor comments to make this more NFC.
================
Comment at: lldb/source/Core/ValueObject.cpp:2028
+
+ // TODO: Don't make this specific to C++.
+ auto type_system_or_err =
----------------
Can't you just call `GetCompilerType().GetTypeSystem()`? This way this whole code isn't C++ specific and much shorter. It also fixes that we end up in the Scratch type system for a language when the CompilerType might not even be from that TypeSystem (but from another TypeSystem for the same language).
================
Comment at: lldb/source/Symbol/ClangASTContext.cpp:3857
+ // TODO: Support more than C++, if needed.
+ if (lang_type != eLanguageTypeC_plus_plus)
+ return llvm::None;
----------------
`ClangUtil::IsClangType(compiler_type)` seems like a more complete check. Then you can also drop the `lang_type` parameter.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69820/new/
https://reviews.llvm.org/D69820
More information about the lldb-commits
mailing list