@@ -45,6 +45,16 @@ class ClangASTMetadata;
45
45
class ClangASTSource ;
46
46
class Declaration ;
47
47
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).
48
58
class TypeSystemClang : public TypeSystem {
49
59
// LLVM RTTI support
50
60
static char ID;
@@ -114,6 +124,7 @@ class TypeSystemClang : public TypeSystem {
114
124
// / purpose it serves in LLDB. Used for example in logs.
115
125
llvm::StringRef getDisplayName () const { return m_display_name; }
116
126
127
+ // / Returns the clang::ASTContext instance managed by this TypeSystemClang.
117
128
clang::ASTContext &getASTContext ();
118
129
119
130
clang::MangleContext *getMangleContext ();
@@ -997,6 +1008,8 @@ class TypeSystemClang : public TypeSystem {
997
1008
void SetTargetTriple (llvm::StringRef target_triple);
998
1009
};
999
1010
1011
+ // / The TypeSystemClang instance used for the scratch ASTContext in a
1012
+ // / lldb::Target.
1000
1013
class TypeSystemClangForExpressions : public TypeSystemClang {
1001
1014
public:
1002
1015
TypeSystemClangForExpressions (Target &target, llvm::Triple triple);
0 commit comments