[llvm] Minimal unwinding information (DWARF CFI) checker (PR #145633)
Paul Kirth via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 25 12:49:48 PDT 2025
================
@@ -0,0 +1,49 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 declares FunctionUnitAnalyzer class.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_UNWINDINFOCHECKER_FUNCTIONUNITANALYZER_H
+#define LLVM_UNWINDINFOCHECKER_FUNCTIONUNITANALYZER_H
+
+#include "llvm/ADT/ArrayRef.h"
+#include <cstdio>
+
+namespace llvm {
+
+class MCCFIInstruction;
+class MCContext;
+class MCInst;
+
+class FunctionUnitAnalyzer {
+private:
+ MCContext &Context;
+
+public:
+ FunctionUnitAnalyzer(const FunctionUnitAnalyzer &) = delete;
+ FunctionUnitAnalyzer &operator=(const FunctionUnitAnalyzer &) = delete;
+ virtual ~FunctionUnitAnalyzer();
+
+ FunctionUnitAnalyzer(MCContext &Context) : Context(Context) {}
+
+ MCContext &getContext() const { return Context; }
+
+ virtual void startFunctionUnit(bool IsEH,
+ ArrayRef<MCCFIInstruction> Prologue);
+ virtual void
+ emitInstructionAndDirectives(const MCInst &Inst,
+ ArrayRef<MCCFIInstruction> Directives);
+ virtual void finishFunctionUnit();
+};
+
+} // namespace llvm
+
+#endif
----------------
ilovepi wrote:
Please check your editor settings, since github seems unhappy w/ the lack of newline here.
https://github.com/llvm/llvm-project/pull/145633
More information about the llvm-commits
mailing list