Skip to content

Commit 813ca53

Browse files
committed
[lldb][NFC] Document TypeSystemClang
1 parent f9568a9 commit 813ca53

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ class ClangASTMetadata;
4545
class ClangASTSource;
4646
class Declaration;
4747

48+
/// A TypeSystem implementation based on Clang.
49+
///
50+
/// This class uses a single clang::ASTContext as the backend for storing
51+
/// its types and declarations. Every clang::ASTContext should also just have
52+
/// a single associated TypeSystemClang instance that manages it.
53+
///
54+
/// The clang::ASTContext instance can either be created by TypeSystemClang
55+
/// itself or it can adopt an existing clang::ASTContext (for example, when
56+
/// it is necessary to provide a TypeSystem interface for an existing
57+
/// clang::ASTContext that was created by clang::CompilerInstance).
4858
class TypeSystemClang : public TypeSystem {
4959
// LLVM RTTI support
5060
static char ID;
@@ -114,6 +124,7 @@ class TypeSystemClang : public TypeSystem {
114124
/// purpose it serves in LLDB. Used for example in logs.
115125
llvm::StringRef getDisplayName() const { return m_display_name; }
116126

127+
/// Returns the clang::ASTContext instance managed by this TypeSystemClang.
117128
clang::ASTContext &getASTContext();
118129

119130
clang::MangleContext *getMangleContext();
@@ -997,6 +1008,8 @@ class TypeSystemClang : public TypeSystem {
9971008
void SetTargetTriple(llvm::StringRef target_triple);
9981009
};
9991010

1011+
/// The TypeSystemClang instance used for the scratch ASTContext in a
1012+
/// lldb::Target.
10001013
class TypeSystemClangForExpressions : public TypeSystemClang {
10011014
public:
10021015
TypeSystemClangForExpressions(Target &target, llvm::Triple triple);

0 commit comments

Comments
 (0)