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

This has bothered me for years.

Note also that the license comment in `Block.cpp` (the previous 
`InterpBlock.cpp`) already reads:

```
//===--- Block.cpp - Allocated blocks for the interpreter -------*- C++ -*-===//
```

>From 53736cb4933c5d181d6d53fa6a9a2fb1ed403b8d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <[email protected]>
Date: Mon, 19 Oct 2026 10:27:27 +0200
Subject: [PATCH] [clang][bytecode][NFC] Rename Interpblock.{h,cpp} to
 Block.{h,cpp}

This has bothered me for years.

Note also that the license comment in `Block.cpp` (the previous
`InterpBlock.cpp`) already reads:

```
//===--- Block.cpp - Allocated blocks for the interpreter -------*- C++ -*-===//
```
---
 clang/lib/AST/ByteCode/{InterpBlock.cpp => Block.cpp} | 2 +-
 clang/lib/AST/ByteCode/{InterpBlock.h => Block.h}     | 2 +-
 clang/lib/AST/ByteCode/DynamicAllocator.cpp           | 1 -
 clang/lib/AST/ByteCode/DynamicAllocator.h             | 2 +-
 clang/lib/AST/ByteCode/Integral.h                     | 2 +-
 clang/lib/AST/ByteCode/InterpFrame.h                  | 2 +-
 clang/lib/AST/ByteCode/Pointer.cpp                    | 1 -
 clang/lib/AST/ByteCode/Pointer.h                      | 2 +-
 clang/lib/AST/CMakeLists.txt                          | 2 +-
 9 files changed, 7 insertions(+), 9 deletions(-)
 rename clang/lib/AST/ByteCode/{InterpBlock.cpp => Block.cpp} (99%)
 rename clang/lib/AST/ByteCode/{InterpBlock.h => Block.h} (99%)

diff --git a/clang/lib/AST/ByteCode/InterpBlock.cpp 
b/clang/lib/AST/ByteCode/Block.cpp
similarity index 99%
rename from clang/lib/AST/ByteCode/InterpBlock.cpp
rename to clang/lib/AST/ByteCode/Block.cpp
index 888a660719590..92019f3a75447 100644
--- a/clang/lib/AST/ByteCode/InterpBlock.cpp
+++ b/clang/lib/AST/ByteCode/Block.cpp
@@ -10,7 +10,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
-#include "InterpBlock.h"
+#include "Block.h"
 #include "Pointer.h"
 
 using namespace clang;
diff --git a/clang/lib/AST/ByteCode/InterpBlock.h 
b/clang/lib/AST/ByteCode/Block.h
similarity index 99%
rename from clang/lib/AST/ByteCode/InterpBlock.h
rename to clang/lib/AST/ByteCode/Block.h
index 8aaff6eb9464e..cac9d683bc139 100644
--- a/clang/lib/AST/ByteCode/InterpBlock.h
+++ b/clang/lib/AST/ByteCode/Block.h
@@ -1,4 +1,4 @@
-//===-- InterpBlock.h - Allocated blocks for the interpreter -*- C++ 
----*-===//
+//===-------- Block.h - Allocated blocks for the interpreter -*- C++ 
----*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
diff --git a/clang/lib/AST/ByteCode/DynamicAllocator.cpp 
b/clang/lib/AST/ByteCode/DynamicAllocator.cpp
index 379df235b7fc1..f213316dfe7a0 100644
--- a/clang/lib/AST/ByteCode/DynamicAllocator.cpp
+++ b/clang/lib/AST/ByteCode/DynamicAllocator.cpp
@@ -7,7 +7,6 @@
 
//===----------------------------------------------------------------------===//
 
 #include "DynamicAllocator.h"
-#include "InterpBlock.h"
 
 using namespace clang;
 using namespace clang::interp;
diff --git a/clang/lib/AST/ByteCode/DynamicAllocator.h 
b/clang/lib/AST/ByteCode/DynamicAllocator.h
index cc6a315083b61..acf75104bb339 100644
--- a/clang/lib/AST/ByteCode/DynamicAllocator.h
+++ b/clang/lib/AST/ByteCode/DynamicAllocator.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_CLANG_AST_INTERP_DYNAMIC_ALLOCATOR_H
 #define LLVM_CLANG_AST_INTERP_DYNAMIC_ALLOCATOR_H
 
+#include "Block.h"
 #include "Descriptor.h"
-#include "InterpBlock.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/iterator_range.h"
 #include "llvm/Support/Allocator.h"
diff --git a/clang/lib/AST/ByteCode/Integral.h 
b/clang/lib/AST/ByteCode/Integral.h
index 543d7f7fd43a9..40ab7ab7841c6 100644
--- a/clang/lib/AST/ByteCode/Integral.h
+++ b/clang/lib/AST/ByteCode/Integral.h
@@ -22,8 +22,8 @@
 #include <cstddef>
 #include <cstdint>
 
+#include "Block.h"
 #include "Descriptor.h"
-#include "InterpBlock.h"
 #include "Primitives.h"
 
 namespace clang {
diff --git a/clang/lib/AST/ByteCode/InterpFrame.h 
b/clang/lib/AST/ByteCode/InterpFrame.h
index acc9c337bfb1b..c668ca4ccdfad 100644
--- a/clang/lib/AST/ByteCode/InterpFrame.h
+++ b/clang/lib/AST/ByteCode/InterpFrame.h
@@ -13,8 +13,8 @@
 #ifndef LLVM_CLANG_AST_INTERP_INTERPFRAME_H
 #define LLVM_CLANG_AST_INTERP_INTERPFRAME_H
 
+#include "Block.h"
 #include "Frame.h"
-#include "InterpBlock.h"
 #include "Pointer.h"
 
 namespace clang {
diff --git a/clang/lib/AST/ByteCode/Pointer.cpp 
b/clang/lib/AST/ByteCode/Pointer.cpp
index 839a0929d1852..41ae8be8e782f 100644
--- a/clang/lib/AST/ByteCode/Pointer.cpp
+++ b/clang/lib/AST/ByteCode/Pointer.cpp
@@ -14,7 +14,6 @@
 #include "Function.h"
 #include "InitMap.h"
 #include "Integral.h"
-#include "InterpBlock.h"
 #include "MemberPointer.h"
 #include "PrimType.h"
 #include "Record.h"
diff --git a/clang/lib/AST/ByteCode/Pointer.h b/clang/lib/AST/ByteCode/Pointer.h
index 926516d4debba..6c8ac0066f597 100644
--- a/clang/lib/AST/ByteCode/Pointer.h
+++ b/clang/lib/AST/ByteCode/Pointer.h
@@ -13,10 +13,10 @@
 #ifndef LLVM_CLANG_AST_INTERP_POINTER_H
 #define LLVM_CLANG_AST_INTERP_POINTER_H
 
+#include "Block.h"
 #include "Descriptor.h"
 #include "Function.h"
 #include "InitMap.h"
-#include "InterpBlock.h"
 #include "clang/AST/ComparisonCategories.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/DeclCXX.h"
diff --git a/clang/lib/AST/CMakeLists.txt b/clang/lib/AST/CMakeLists.txt
index c703151f78772..5d910d71d7d74 100644
--- a/clang/lib/AST/CMakeLists.txt
+++ b/clang/lib/AST/CMakeLists.txt
@@ -70,6 +70,7 @@ add_clang_library(clangAST
   InferAlloc.cpp
   InheritViz.cpp
   ByteCode/BitcastBuffer.cpp
+  ByteCode/Block.cpp
   ByteCode/ByteCodeEmitter.cpp
   ByteCode/Compiler.cpp
   ByteCode/Context.cpp
@@ -85,7 +86,6 @@ add_clang_library(clangAST
   ByteCode/DynamicAllocator.cpp
   ByteCode/InitMap.cpp
   ByteCode/Interp.cpp
-  ByteCode/InterpBlock.cpp
   ByteCode/InterpFrame.cpp
   ByteCode/InterpStack.cpp
   ByteCode/InterpState.cpp

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to