LLDB  mainline
AppleObjCTypeEncodingParser.h
Go to the documentation of this file.
1 //===-- AppleObjCTypeEncodingParser.h ---------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_OBJC_APPLEOBJCRUNTIME_APPLEOBJCTYPEENCODINGPARSER_H
10 #define LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_OBJC_APPLEOBJCRUNTIME_APPLEOBJCTYPEENCODINGPARSER_H
11 
12 #include "clang/AST/ASTContext.h"
13 
14 #include "lldb/lldb-private.h"
15 
17 
18 namespace lldb_private {
19 class StringLexer;
21 public:
23  ~AppleObjCTypeEncodingParser() override = default;
24 
25  CompilerType RealizeType(TypeSystemClang &ast_ctx, const char *name,
26  bool for_expression) override;
27 
28 private:
29  struct StructElement {
30  std::string name;
31  clang::QualType type;
33 
34  StructElement();
35  ~StructElement() = default;
36  };
37 
38  clang::QualType BuildType(TypeSystemClang &clang_ast_ctx, StringLexer &type,
39  bool for_expression,
40  uint32_t *bitfield_bit_size = nullptr);
41 
42  clang::QualType BuildStruct(TypeSystemClang &ast_ctx, StringLexer &type,
43  bool for_expression);
44 
45  clang::QualType BuildAggregate(TypeSystemClang &clang_ast_ctx,
46  StringLexer &type, bool for_expression,
47  char opener, char closer, uint32_t kind);
48 
49  clang::QualType BuildUnion(TypeSystemClang &ast_ctx, StringLexer &type,
50  bool for_expression);
51 
52  clang::QualType BuildArray(TypeSystemClang &ast_ctx, StringLexer &type,
53  bool for_expression);
54 
55  std::string ReadStructName(StringLexer &type);
56 
58  bool for_expression);
59 
60  clang::QualType BuildObjCObjectPointerType(TypeSystemClang &clang_ast_ctx,
62  bool for_expression);
63 
65 
66  std::string ReadQuotedString(StringLexer &type);
67 
69 };
70 
71 } // namespace lldb_private
72 
73 #endif // LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_OBJC_APPLEOBJCRUNTIME_APPLEOBJCTYPEENCODINGPARSER_H
A class that represents a running process on the host machine.
clang::QualType BuildStruct(TypeSystemClang &ast_ctx, StringLexer &type, bool for_expression)
A TypeSystem implementation based on Clang.
clang::QualType BuildObjCObjectPointerType(TypeSystemClang &clang_ast_ctx, StringLexer &type, bool for_expression)
clang::QualType BuildArray(TypeSystemClang &ast_ctx, StringLexer &type, bool for_expression)
clang::QualType BuildAggregate(TypeSystemClang &clang_ast_ctx, StringLexer &type, bool for_expression, char opener, char closer, uint32_t kind)
clang::QualType BuildType(TypeSystemClang &clang_ast_ctx, StringLexer &type, bool for_expression, uint32_t *bitfield_bit_size=nullptr)
CompilerType RealizeType(TypeSystemClang &ast_ctx, const char *name, bool for_expression) override
Represents a generic type in a programming language.
Definition: CompilerType.h:33
clang::QualType BuildUnion(TypeSystemClang &ast_ctx, StringLexer &type, bool for_expression)
StructElement ReadStructElement(TypeSystemClang &ast_ctx, StringLexer &type, bool for_expression)