LLDB mainline
ObjCPlusPlusLanguage.cpp
Go to the documentation of this file.
1//===-- ObjCPlusPlusLanguage.cpp ------------------------------------------===//
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
10
13
14using namespace lldb;
15using namespace lldb_private;
16
18
19bool ObjCPlusPlusLanguage::IsSourceFile(llvm::StringRef file_path) const {
20 const auto suffixes = {".h", ".mm"};
21 for (auto suffix : suffixes) {
22 if (file_path.ends_with_insensitive(suffix))
23 return true;
24 }
25 return false;
26}
27
29 PluginManager::RegisterPlugin(GetPluginNameStatic(), "Objective-C++ Language",
31}
32
35}
36
37// Static Functions
39 switch (language) {
41 return new ObjCPlusPlusLanguage();
42 default:
43 return nullptr;
44 }
45}
#define LLDB_PLUGIN_DEFINE(PluginName)
Definition: PluginManager.h:31
static llvm::StringRef GetPluginNameStatic()
static lldb_private::Language * CreateInstance(lldb::LanguageType language)
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
A class that represents a running process on the host machine.
Definition: SBAddress.h:15
LanguageType
Programming language type.
@ eLanguageTypeObjC_plus_plus
Objective-C++.
Definition: Debugger.h:54