[llvm] [llvm-debuginfo-analyzer] Add support for LLVM IR format. (PR #135440)
Javier Lopez-Gomez via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 3 08:01:22 PDT 2025
================
@@ -0,0 +1,304 @@
+//===-- LVIRReader.h --------------------------------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the LVIRReader class, which is used to describe a
+// LLVM IR reader.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_LOGICALVIEW_READERS_LVIRREADER_H
+#define LLVM_DEBUGINFO_LOGICALVIEW_READERS_LVIRREADER_H
+
+#include "llvm/DebugInfo/LogicalView/Core/LVReader.h"
+#include "llvm/Transforms/Utils/DebugSSAUpdater.h"
+
+namespace llvm {
+class DIFile;
+class DINode;
+class DILocation;
+class DIScope;
+class DISubprogram;
+class DIVariable;
+class BasicBlock;
+
+namespace object {
+class IRObjectFile;
+}
+
+namespace logicalview {
+
+class LVElement;
+class LVLine;
+class LVScopeCompileUnit;
+class LVSymbol;
+class LVType;
+
+class LVIRReader final : public LVReader {
+ object::IRObjectFile *BitCodeIR = nullptr;
+ MemoryBufferRef *TextualIR = nullptr;
+
+ // Symbols with locations for current compile unit.
+ LVSymbols SymbolsWithLocations;
+
+ LVSectionIndex SectionIndex = 0;
----------------
jalopezg-git wrote:
Consider adding brief documentation for the `SectionIndex` data member.
https://github.com/llvm/llvm-project/pull/135440
More information about the llvm-commits
mailing list