LLDB mainline
SBLanguageRuntime.h
Go to the documentation of this file.
1//===-- SBLanguageRuntime.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_API_SBLANGUAGERUNTIME_H
10#define LLDB_API_SBLANGUAGERUNTIME_H
11
12#include "lldb/API/SBDefines.h"
13
14namespace lldb {
15
17public:
18 static lldb::LanguageType GetLanguageTypeFromString(const char *string);
19
20 static const char *GetNameForLanguageType(lldb::LanguageType language);
21
22 /// Returns whether the given language is any version of C++.
23 static bool LanguageIsCPlusPlus(lldb::LanguageType language);
24
25 /// Returns whether the given language is Obj-C or Obj-C++.
26 static bool LanguageIsObjC(lldb::LanguageType language);
27
28 /// Returns whether the given language is any version of C, C++ or Obj-C.
29 static bool LanguageIsCFamily(lldb::LanguageType language);
30
31 /// Returns whether the given language supports exception breakpoints on
32 /// throw statements.
34
35 /// Returns whether the given language supports exception breakpoints on
36 /// catch statements.
38
39 /// Returns the keyword used for throw statements in the given language, e.g.
40 /// Python uses \b raise. Returns \b nullptr if the language is not supported.
41 static const char *GetThrowKeywordForLanguage(lldb::LanguageType language);
42
43 /// Returns the keyword used for catch statements in the given language, e.g.
44 /// Python uses \b except. Returns \b nullptr if the language is not
45 /// supported.
46 static const char *GetCatchKeywordForLanguage(lldb::LanguageType language);
47};
48
49} // namespace lldb
50
51#endif // LLDB_API_SBLANGUAGERUNTIME_H
static bool LanguageIsObjC(lldb::LanguageType language)
Returns whether the given language is Obj-C or Obj-C++.
static bool LanguageIsCFamily(lldb::LanguageType language)
Returns whether the given language is any version of C, C++ or Obj-C.
static bool SupportsExceptionBreakpointsOnThrow(lldb::LanguageType language)
Returns whether the given language supports exception breakpoints on throw statements.
static bool SupportsExceptionBreakpointsOnCatch(lldb::LanguageType language)
Returns whether the given language supports exception breakpoints on catch statements.
static const char * GetNameForLanguageType(lldb::LanguageType language)
static const char * GetThrowKeywordForLanguage(lldb::LanguageType language)
Returns the keyword used for throw statements in the given language, e.g.
static bool LanguageIsCPlusPlus(lldb::LanguageType language)
Returns whether the given language is any version of C++.
static const char * GetCatchKeywordForLanguage(lldb::LanguageType language)
Returns the keyword used for catch statements in the given language, e.g.
static lldb::LanguageType GetLanguageTypeFromString(const char *string)
Definition: SBAddress.h:15
LanguageType
Programming language type.