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 16 namespace lldb_private { 17 18 class ObjCPlusPlusLanguage : public Language { 19 ClangHighlighter m_highlighter; 20 21 public: 22 ObjCPlusPlusLanguage() = default; 23 24 ~ObjCPlusPlusLanguage() override = default; 25 GetLanguageType()26 lldb::LanguageType GetLanguageType() const override { 27 return lldb::eLanguageTypeObjC_plus_plus; 28 } 29 GetNilReferenceSummaryString()30 llvm::StringRef GetNilReferenceSummaryString() override { return "nil"; } 31 32 bool IsSourceFile(llvm::StringRef file_path) const override; 33 GetHighlighter()34 const Highlighter *GetHighlighter() const override { return &m_highlighter; } 35 36 // Static Functions 37 static void Initialize(); 38 39 static void Terminate(); 40 41 static lldb_private::Language *CreateInstance(lldb::LanguageType language); 42 43 static lldb_private::ConstString GetPluginNameStatic(); 44 45 // PluginInterface protocol 46 ConstString GetPluginName() override; 47 48 uint32_t GetPluginVersion() override; 49 }; 50 51 } // namespace lldb_private 52 53 #endif // LLDB_SOURCE_PLUGINS_LANGUAGE_OBJCPLUSPLUS_OBJCPLUSPLUSLANGUAGE_H 54