[llvm] Minimal unwinding information (DWARF CFI) checker (PR #145633)

Simon Tatham via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 27 06:47:08 PDT 2025


================
@@ -0,0 +1,42 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 DWARFCFIState class.
----------------
statham-arm wrote:

Missing explanation: what is this class for? How is somebody expected to use it?

Looking just at the API here, it seems strangely "write only". There's an update function to pass data _in_ to it, and you can retrieve an iterator pointing at the current last row (if any), but how does anyone read data out of it again? It looks almost impossible. You could step through the table starting from the iterator returned from `getCurrentUnwindRow`, but you wouldn't be able to tell when to stop, because you can't check it against `Table.begin()` from outside the class, because `Table` itself is private.

I look at this file and think "surely once you've put data in here it can't be retrieved, so what's the point?". The header comment is a good place to explain what the point is.

https://github.com/llvm/llvm-project/pull/145633


More information about the llvm-commits mailing list