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 {
20public:
22 ~AppleObjCTypeEncodingParser() override = default;
23
24 CompilerType RealizeType(TypeSystemClang &ast_ctx, const char *name,
25 bool for_expression) override;
26
27private:
29 std::string name;
30 clang::QualType type;
31 uint32_t bitfield = 0;
32
34 ~StructElement() = default;
35 };
36
37 clang::QualType BuildType(TypeSystemClang &clang_ast_ctx,
38 llvm::StringRef &type, bool for_expression,
39 uint32_t *bitfield_bit_size = nullptr);
40
41 clang::QualType BuildStruct(TypeSystemClang &ast_ctx, llvm::StringRef &type,
42 bool for_expression);
43
44 clang::QualType BuildAggregate(TypeSystemClang &clang_ast_ctx,
45 llvm::StringRef &type, bool for_expression,
46 char opener, char closer, uint32_t kind);
47
48 clang::QualType BuildUnion(TypeSystemClang &ast_ctx, llvm::StringRef &type,
49 bool for_expression);
50
51 clang::QualType BuildArray(TypeSystemClang &ast_ctx, llvm::StringRef &type,
52 bool for_expression);
53
54 std::string ReadStructName(llvm::StringRef &type);
55
57 llvm::StringRef &type, bool for_expression);
58
59 clang::QualType BuildObjCObjectPointerType(TypeSystemClang &clang_ast_ctx,
60 llvm::StringRef &type,
61 bool for_expression);
62
63 uint32_t ReadNumber(llvm::StringRef &type);
64
65 std::optional<std::string> ReadQuotedString(llvm::StringRef &type);
66
68};
69
70} // namespace lldb_private
71
72#endif // LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_OBJC_APPLEOBJCRUNTIME_APPLEOBJCTYPEENCODINGPARSER_H
clang::QualType BuildArray(TypeSystemClang &ast_ctx, llvm::StringRef &type, bool for_expression)
clang::QualType BuildAggregate(TypeSystemClang &clang_ast_ctx, llvm::StringRef &type, bool for_expression, char opener, char closer, uint32_t kind)
clang::QualType BuildObjCObjectPointerType(TypeSystemClang &clang_ast_ctx, llvm::StringRef &type, bool for_expression)
std::optional< std::string > ReadQuotedString(llvm::StringRef &type)
clang::QualType BuildStruct(TypeSystemClang &ast_ctx, llvm::StringRef &type, bool for_expression)
CompilerType RealizeType(TypeSystemClang &ast_ctx, const char *name, bool for_expression) override
StructElement ReadStructElement(TypeSystemClang &ast_ctx, llvm::StringRef &type, bool for_expression)
clang::QualType BuildUnion(TypeSystemClang &ast_ctx, llvm::StringRef &type, bool for_expression)
clang::QualType BuildType(TypeSystemClang &clang_ast_ctx, llvm::StringRef &type, bool for_expression, uint32_t *bitfield_bit_size=nullptr)
Generic representation of a type in a programming language.
A TypeSystem implementation based on Clang.
A class that represents a running process on the host machine.