1//===-- ObjCPlusPlusLanguage.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_LANGUAGE_OBJCPLUSPLUS_OBJCPLUSPLUSLANGUAGE_H
10#define LLDB_SOURCE_PLUGINS_LANGUAGE_OBJCPLUSPLUS_OBJCPLUSPLUSLANGUAGE_H
11
12#include "Plugins/Language/ClangCommon/ClangHighlighter.h"
13#include "lldb/Target/Language.h"
14#include "lldb/lldb-private.h"
15
16namespace lldb_private {
17
18class ObjCPlusPlusLanguage : public Language {
19 ClangHighlighter m_highlighter;
20
21public:
22 ObjCPlusPlusLanguage() = default;
23
24 ~ObjCPlusPlusLanguage() override = default;
25
26 lldb::LanguageType GetLanguageType() const override {
27 return lldb::eLanguageTypeObjC_plus_plus;
28 }
29
30 llvm::StringRef GetUserEntryPointName() const override { return "main"; }
31
32 llvm::StringRef GetNilReferenceSummaryString() override { return "nil"; }
33
34 bool IsSourceFile(llvm::StringRef file_path) const override;
35
36 const Highlighter *GetHighlighter() const override { return &m_highlighter; }
37
38 // Static Functions
39 static void Initialize();
40
41 static void Terminate();
42
43 static lldb_private::Language *CreateInstance(lldb::LanguageType language);
44
45 llvm::StringRef GetInstanceVariableName() override { return "self"; }
46
47 static llvm::StringRef GetPluginNameStatic() { return "objcplusplus"; }
48
49 // PluginInterface protocol
50 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
51};
52
53} // namespace lldb_private
54
55#endif // LLDB_SOURCE_PLUGINS_LANGUAGE_OBJCPLUSPLUS_OBJCPLUSPLUSLANGUAGE_H
56

source code of lldb/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h