2015-04-28 20:51:16 +08:00
|
|
|
//===-- SBLanguageRuntime.cpp -----------------------------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2015-04-28 20:51:16 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "lldb/API/SBLanguageRuntime.h"
|
2019-03-06 08:06:00 +08:00
|
|
|
#include "SBReproducerPrivate.h"
|
2015-09-02 09:06:46 +08:00
|
|
|
#include "lldb/Target/Language.h"
|
2015-04-28 20:51:16 +08:00
|
|
|
|
|
|
|
using namespace lldb;
|
|
|
|
using namespace lldb_private;
|
|
|
|
|
|
|
|
lldb::LanguageType
|
2016-09-07 04:57:50 +08:00
|
|
|
SBLanguageRuntime::GetLanguageTypeFromString(const char *string) {
|
2019-03-06 08:06:00 +08:00
|
|
|
LLDB_RECORD_STATIC_METHOD(lldb::LanguageType, SBLanguageRuntime,
|
|
|
|
GetLanguageTypeFromString, (const char *), string);
|
|
|
|
|
2016-09-24 01:48:13 +08:00
|
|
|
return Language::GetLanguageTypeFromString(
|
|
|
|
llvm::StringRef::withNullAsEmpty(string));
|
2015-04-28 20:51:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
const char *
|
2016-09-07 04:57:50 +08:00
|
|
|
SBLanguageRuntime::GetNameForLanguageType(lldb::LanguageType language) {
|
2019-03-06 08:06:00 +08:00
|
|
|
LLDB_RECORD_STATIC_METHOD(const char *, SBLanguageRuntime,
|
|
|
|
GetNameForLanguageType, (lldb::LanguageType),
|
|
|
|
language);
|
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
return Language::GetNameForLanguageType(language);
|
2015-04-28 20:51:16 +08:00
|
|
|
}
|