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 
14 #include "lldb/lldb-private.h"
15 
16 #include "clang/AST/ASTContext.h"
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 {
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 
56 
58  bool for_expression);
59 
60  clang::QualType BuildObjCObjectPointerType(TypeSystemClang &clang_ast_ctx,
61  StringLexer &type,
62  bool for_expression);
63 
65 
67 
69 };
70 
71 } // namespace lldb_private
72 
73 #endif // LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_OBJC_APPLEOBJCRUNTIME_APPLEOBJCTYPEENCODINGPARSER_H
lldb_private::AppleObjCTypeEncodingParser::StructElement::StructElement
StructElement()
Definition: AppleObjCTypeEncodingParser.cpp:61
lldb_private::ObjCLanguageRuntime
Definition: ObjCLanguageRuntime.h:34
ObjCConstants.h
lldb_private::AppleObjCTypeEncodingParser::StructElement
Definition: AppleObjCTypeEncodingParser.h:29
lldb_private::AppleObjCTypeEncodingParser::AppleObjCTypeEncodingParser
AppleObjCTypeEncodingParser(ObjCLanguageRuntime &runtime)
Definition: AppleObjCTypeEncodingParser.cpp:24
lldb_private::AppleObjCTypeEncodingParser::BuildStruct
clang::QualType BuildStruct(TypeSystemClang &ast_ctx, StringLexer &type, bool for_expression)
Definition: AppleObjCTypeEncodingParser.cpp:79
lldb_private::AppleObjCTypeEncodingParser::ReadNumber
uint32_t ReadNumber(StringLexer &type)
Definition: AppleObjCTypeEncodingParser.cpp:50
lldb_private::AppleObjCTypeEncodingParser::BuildArray
clang::QualType BuildArray(TypeSystemClang &ast_ctx, StringLexer &type, bool for_expression)
Definition: AppleObjCTypeEncodingParser.cpp:149
lldb_private::AppleObjCTypeEncodingParser::ReadStructName
std::string ReadStructName(StringLexer &type)
Definition: AppleObjCTypeEncodingParser.cpp:33
lldb_private::AppleObjCTypeEncodingParser::BuildType
clang::QualType BuildType(TypeSystemClang &clang_ast_ctx, StringLexer &type, bool for_expression, uint32_t *bitfield_bit_size=nullptr)
Definition: AppleObjCTypeEncodingParser.cpp:252
lldb_private::AppleObjCTypeEncodingParser::~AppleObjCTypeEncodingParser
~AppleObjCTypeEncodingParser() override=default
lldb_private::AppleObjCTypeEncodingParser::BuildObjCObjectPointerType
clang::QualType BuildObjCObjectPointerType(TypeSystemClang &clang_ast_ctx, StringLexer &type, bool for_expression)
Definition: AppleObjCTypeEncodingParser.cpp:167
lldb_private::AppleObjCTypeEncodingParser::RealizeType
CompilerType RealizeType(TypeSystemClang &ast_ctx, const char *name, bool for_expression) override
Definition: AppleObjCTypeEncodingParser.cpp:358
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::AppleObjCTypeEncodingParser::m_runtime
ObjCLanguageRuntime & m_runtime
Definition: AppleObjCTypeEncodingParser.h:68
lldb-private.h
uint32_t
lldb_private::AppleObjCTypeEncodingParser::BuildAggregate
clang::QualType BuildAggregate(TypeSystemClang &clang_ast_ctx, StringLexer &type, bool for_expression, char opener, char closer, uint32_t kind)
Definition: AppleObjCTypeEncodingParser.cpp:91
ObjCLanguageRuntime.h
lldb_private::AppleObjCTypeEncodingParser::StructElement::type
clang::QualType type
Definition: AppleObjCTypeEncodingParser.h:31
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:33
lldb_private::AppleObjCTypeEncodingParser::StructElement::name
std::string name
Definition: AppleObjCTypeEncodingParser.h:30
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::AppleObjCTypeEncodingParser::StructElement::~StructElement
~StructElement()=default
lldb_private::AppleObjCTypeEncodingParser
Definition: AppleObjCTypeEncodingParser.h:20
lldb_private::TypeSystemClang
A TypeSystem implementation based on Clang.
Definition: TypeSystemClang.h:106
lldb_private::ObjCLanguageRuntime::EncodingToType
Definition: ObjCLanguageRuntime.h:151
lldb_private::AppleObjCTypeEncodingParser::ReadQuotedString
std::string ReadQuotedString(StringLexer &type)
Definition: AppleObjCTypeEncodingParser.cpp:40
lldb_private::AppleObjCTypeEncodingParser::BuildUnion
clang::QualType BuildUnion(TypeSystemClang &ast_ctx, StringLexer &type, bool for_expression)
Definition: AppleObjCTypeEncodingParser.cpp:85
lldb_private::AppleObjCTypeEncodingParser::ReadStructElement
StructElement ReadStructElement(TypeSystemClang &ast_ctx, StringLexer &type, bool for_expression)
Definition: AppleObjCTypeEncodingParser.cpp:65
lldb_private::AppleObjCTypeEncodingParser::StructElement::bitfield
uint32_t bitfield
Definition: AppleObjCTypeEncodingParser.h:32
lldb_private::StringLexer
Definition: StringLexer.h:18