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
18namespace lldb_private {
19class StringLexer;
21public:
23 ~AppleObjCTypeEncodingParser() override = default;
24
25 CompilerType RealizeType(TypeSystemClang &ast_ctx, const char *name,
26 bool for_expression) override;
27
28private:
30 std::string name;
31 clang::QualType type;
32 uint32_t bitfield = 0;
33
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,
61 StringLexer &type,
62 bool for_expression);
63
64 uint32_t ReadNumber(StringLexer &type);
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
clang::QualType BuildType(TypeSystemClang &clang_ast_ctx, StringLexer &type, bool for_expression, uint32_t *bitfield_bit_size=nullptr)
clang::QualType BuildObjCObjectPointerType(TypeSystemClang &clang_ast_ctx, StringLexer &type, bool for_expression)
CompilerType RealizeType(TypeSystemClang &ast_ctx, const char *name, bool for_expression) override
clang::QualType BuildAggregate(TypeSystemClang &clang_ast_ctx, StringLexer &type, bool for_expression, char opener, char closer, uint32_t kind)
StructElement ReadStructElement(TypeSystemClang &ast_ctx, StringLexer &type, bool for_expression)
clang::QualType BuildArray(TypeSystemClang &ast_ctx, StringLexer &type, bool for_expression)
clang::QualType BuildStruct(TypeSystemClang &ast_ctx, StringLexer &type, bool for_expression)
clang::QualType BuildUnion(TypeSystemClang &ast_ctx, StringLexer &type, bool for_expression)
Generic representation of a type in a programming language.
Definition: CompilerType.h:36
A TypeSystem implementation based on Clang.
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14