1 //===-- SBLanguageRuntime.cpp -----------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #include "lldb/API/SBLanguageRuntime.h"
10 #include "SBReproducerPrivate.h"
11 #include "lldb/Target/Language.h"
14 using namespace lldb_private
;
17 SBLanguageRuntime::GetLanguageTypeFromString(const char *string
) {
18 LLDB_RECORD_STATIC_METHOD(lldb::LanguageType
, SBLanguageRuntime
,
19 GetLanguageTypeFromString
, (const char *), string
);
21 return Language::GetLanguageTypeFromString(
22 llvm::StringRef::withNullAsEmpty(string
));
26 SBLanguageRuntime::GetNameForLanguageType(lldb::LanguageType language
) {
27 LLDB_RECORD_STATIC_METHOD(const char *, SBLanguageRuntime
,
28 GetNameForLanguageType
, (lldb::LanguageType
),
31 return Language::GetNameForLanguageType(language
);
34 namespace lldb_private
{
38 void RegisterMethods
<SBLanguageRuntime
>(Registry
&R
) {
39 LLDB_REGISTER_STATIC_METHOD(lldb::LanguageType
, SBLanguageRuntime
,
40 GetLanguageTypeFromString
, (const char *));
41 LLDB_REGISTER_STATIC_METHOD(const char *, SBLanguageRuntime
,
42 GetNameForLanguageType
, (lldb::LanguageType
));