================ @@ -0,0 +1,71 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// +//===----------------------------------------------------------------------===// + +#include "MicrosoftABILanguageRuntime.h" + +#include "lldb/Core/PluginManager.h" +#include "lldb/Target/Process.h" + +using namespace lldb; +using namespace lldb_private; + +LLDB_PLUGIN_DEFINE_ADV(MicrosoftABILanguageRuntime, CXXMicrosoftABI) + +char MicrosoftABILanguageRuntime::ID = 0; + +void MicrosoftABILanguageRuntime::Initialize() { + PluginManager::RegisterPlugin(GetPluginNameStatic(), + "Microsoft ABI for the C++ language", + CreateInstance); +} + +void MicrosoftABILanguageRuntime::Terminate() { + PluginManager::UnregisterPlugin(CreateInstance); +} + +LanguageRuntime * +MicrosoftABILanguageRuntime::CreateInstance(Process *process, + lldb::LanguageType language) { + if (!ShouldUseMicrosoftABI(process)) + return nullptr; + + if (!(language == eLanguageTypeC_plus_plus || + language == eLanguageTypeC_plus_plus_03 || + language == eLanguageTypeC_plus_plus_11 || + language == eLanguageTypeC_plus_plus_14)) ---------------- bulbazord wrote:
Suggestion: `Language::LanguageIsCPlusPlus` https://github.com/llvm/llvm-project/pull/168941 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
