[Lldb-commits] [lldb] 813ca53 - [lldb][NFC] Document TypeSystemClang
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 18 00:00:25 PST 2020
Author: Raphael Isemann
Date: 2020-02-18T09:00:03+01:00
New Revision: 813ca53fdea130a23e302ea2afecaa5134def6db
URL: https://github.com/llvm/llvm-project/commit/813ca53fdea130a23e302ea2afecaa5134def6db
DIFF: https://github.com/llvm/llvm-project/commit/813ca53fdea130a23e302ea2afecaa5134def6db.diff
LOG: [lldb][NFC] Document TypeSystemClang
Added:
Modified:
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
Removed:
################################################################################
diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
index 02382b587d67..dc9a10bd61a0 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
@@ -45,6 +45,16 @@ class ClangASTMetadata;
class ClangASTSource;
class Declaration;
+/// A TypeSystem implementation based on Clang.
+///
+/// This class uses a single clang::ASTContext as the backend for storing
+/// its types and declarations. Every clang::ASTContext should also just have
+/// a single associated TypeSystemClang instance that manages it.
+///
+/// The clang::ASTContext instance can either be created by TypeSystemClang
+/// itself or it can adopt an existing clang::ASTContext (for example, when
+/// it is necessary to provide a TypeSystem interface for an existing
+/// clang::ASTContext that was created by clang::CompilerInstance).
class TypeSystemClang : public TypeSystem {
// LLVM RTTI support
static char ID;
@@ -114,6 +124,7 @@ class TypeSystemClang : public TypeSystem {
/// purpose it serves in LLDB. Used for example in logs.
llvm::StringRef getDisplayName() const { return m_display_name; }
+ /// Returns the clang::ASTContext instance managed by this TypeSystemClang.
clang::ASTContext &getASTContext();
clang::MangleContext *getMangleContext();
@@ -997,6 +1008,8 @@ class TypeSystemClang : public TypeSystem {
void SetTargetTriple(llvm::StringRef target_triple);
};
+/// The TypeSystemClang instance used for the scratch ASTContext in a
+/// lldb::Target.
class TypeSystemClangForExpressions : public TypeSystemClang {
public:
TypeSystemClangForExpressions(Target &target, llvm::Triple triple);
More information about the lldb-commits
mailing list