[clang] [clang][bytecode][NFC] Add InterpFrame::getName() (PR #181158)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 12 06:51:42 PST 2026


https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/181158

None

>From fd5451896b879fef87c18e9d31eb2c3457d59ca0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Thu, 12 Feb 2026 15:40:30 +0100
Subject: [PATCH] [clang][bytecode][NFC] Add InterpFrame::getName()

---
 clang/lib/AST/ByteCode/InterpFrame.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/clang/lib/AST/ByteCode/InterpFrame.h b/clang/lib/AST/ByteCode/InterpFrame.h
index 61c1065e5848a..0879260695d3e 100644
--- a/clang/lib/AST/ByteCode/InterpFrame.h
+++ b/clang/lib/AST/ByteCode/InterpFrame.h
@@ -46,6 +46,12 @@ class InterpFrame final : public Frame {
   /// Destroys the frame, killing all live pointers to stack slots.
   ~InterpFrame();
 
+  std::string getName() const {
+    if (!Func)
+      return "Bottom frame";
+    return Func->getName();
+  }
+
   static void free(InterpFrame *F) {
     if (!F->isBottomFrame())
       delete F;



More information about the cfe-commits mailing list