[Lldb-commits] [lldb] [LLDB] Add empty Microsoft ABI language runtime (PR #168941)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Dec 1 12:50:01 PST 2025
================
@@ -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))
----------------
Nerixyz wrote:
Oh, sorry for the confusion. I should've closed this PR in favor of https://github.com/llvm/llvm-project/pull/169225.
Though, the comment applies to the linked PR as well, since that's how the Itanium ABI runtime checked for the language.
https://github.com/llvm/llvm-project/pull/168941
More information about the lldb-commits
mailing list