[LoongArch][Clang] Make the parameters and return value of {x,}vorn.v builti ns ...
[llvm-project.git] / lldb / source / Plugins / SymbolFile / JSON / SymbolFileJSON.h
blob3dd33b3dc82fba8a16c50f6206f2e0a59c9d2556
1 //===-- SymbolFileJSON.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 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_JSON_SYMBOLFILEJSON_H
10 #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_JSON_SYMBOLFILEJSON_H
12 #include <map>
13 #include <optional>
14 #include <vector>
16 #include "lldb/Symbol/CompileUnit.h"
17 #include "lldb/Symbol/SymbolFile.h"
19 namespace lldb_private {
21 class SymbolFileJSON : public lldb_private::SymbolFileCommon {
22 /// LLVM RTTI support.
23 static char ID;
25 public:
26 /// LLVM RTTI support.
27 /// \{
28 bool isA(const void *ClassID) const override {
29 return ClassID == &ID || SymbolFileCommon::isA(ClassID);
31 static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
32 /// \}
34 SymbolFileJSON(lldb::ObjectFileSP objfile_sp);
36 static void Initialize();
38 static void Terminate();
40 static llvm::StringRef GetPluginNameStatic() { return "JSON"; }
42 static llvm::StringRef GetPluginDescriptionStatic();
44 static lldb_private::SymbolFile *
45 CreateInstance(lldb::ObjectFileSP objfile_sp);
47 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
49 uint32_t CalculateAbilities() override;
51 lldb::LanguageType ParseLanguage(CompileUnit &comp_unit) override {
52 return lldb::eLanguageTypeUnknown;
55 size_t ParseFunctions(CompileUnit &comp_unit) override { return 0; }
57 bool ParseLineTable(CompileUnit &comp_unit) override { return false; }
59 bool ParseDebugMacros(CompileUnit &comp_unit) override { return false; }
61 bool ParseSupportFiles(CompileUnit &comp_unit,
62 SupportFileList &support_files) override {
63 return false;
66 size_t ParseTypes(CompileUnit &cu) override { return 0; }
68 bool ParseImportedModules(
69 const SymbolContext &sc,
70 std::vector<lldb_private::SourceModule> &imported_modules) override {
71 return false;
74 size_t ParseBlocksRecursive(Function &func) override { return 0; }
76 size_t ParseVariablesForContext(const SymbolContext &sc) override {
77 return 0;
80 uint32_t CalculateNumCompileUnits() override { return 0; }
82 lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
84 Type *ResolveTypeUID(lldb::user_id_t type_uid) override { return nullptr; }
85 std::optional<ArrayInfo> GetDynamicArrayInfoForUID(
86 lldb::user_id_t type_uid,
87 const lldb_private::ExecutionContext *exe_ctx) override {
88 return std::nullopt;
91 bool CompleteType(CompilerType &compiler_type) override { return false; }
93 uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr,
94 lldb::SymbolContextItem resolve_scope,
95 lldb_private::SymbolContext &sc) override;
97 void GetTypes(lldb_private::SymbolContextScope *sc_scope,
98 lldb::TypeClass type_mask,
99 lldb_private::TypeList &type_list) override;
101 void AddSymbols(Symtab &symtab) override;
103 private:
104 lldb::addr_t GetBaseFileAddress();
106 std::vector<std::pair<uint64_t, std::string>> m_symbols;
108 } // namespace lldb_private
110 #endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_JSON_SYMBOLFILEJSON_H