[Lldb-commits] [lldb] [lldb][Fortran] Added DWARFASTParser for Fortran (PR #218024)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 7 02:29:56 PDT 2026
================
@@ -0,0 +1,89 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// This file implements the Fortran type system.
+///
+//===----------------------------------------------------------------------===//
+#include "TypeSystemFortran.h"
+
+#include "lldb/Core/PluginManager.h"
+#include "lldb/Symbol/SymbolFile.h"
+#include "lldb/Target/Target.h"
+
+#include "Plugins/SymbolFile/DWARF/DWARFASTParserFortran.h"
+
+using namespace lldb;
+using namespace lldb_private;
+using namespace llvm;
+using namespace lldb_private::plugin::dwarf;
+
+LLDB_PLUGIN_DEFINE(TypeSystemFortran)
+
+/// Used to determine if TypeSystem supports the language passed in
+/// CreateInstance
+static bool IsLanguageSupported(lldb::LanguageType language) {
+ if (language == lldb::LanguageType::eLanguageTypeFortran77 ||
----------------
DavidSpickett wrote:
I wonder if you could use some static constexpr whatever list of these language values, so that you don't have to spell out the list in two places in this file.
Maybe if there's a good place for it, an IsFortran or GiveMeAllTheFortrans function could be useful.
https://github.com/llvm/llvm-project/pull/218024
More information about the lldb-commits
mailing list