[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / lldb / source / API / SBLanguageRuntime.cpp
blob04bd08fb739e04ea4ea5b28bc1deb813262d47e5
1 //===-- SBLanguageRuntime.cpp -----------------------------------*- 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 //===----------------------------------------------------------------------===//
9 #include "lldb/API/SBLanguageRuntime.h"
10 #include "SBReproducerPrivate.h"
11 #include "lldb/Target/Language.h"
13 using namespace lldb;
14 using namespace lldb_private;
16 lldb::LanguageType
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));
25 const char *
26 SBLanguageRuntime::GetNameForLanguageType(lldb::LanguageType language) {
27 LLDB_RECORD_STATIC_METHOD(const char *, SBLanguageRuntime,
28 GetNameForLanguageType, (lldb::LanguageType),
29 language);
31 return Language::GetNameForLanguageType(language);
34 namespace lldb_private {
35 namespace repro {
37 template <>
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));