[clang] 7e87ece - [clang] Remove unused declarations in CGDebugInfo (NFC) (#239487)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 13 20:53:26 PST 2026
Author: Kazu Hirata
Date: 2026-11-13T20:53:21-08:00
New Revision: 7e87ece94287623423d70641b0abcc05e27ba9f4
URL: https://github.com/llvm/llvm-project/commit/7e87ece94287623423d70641b0abcc05e27ba9f4
DIFF: https://github.com/llvm/llvm-project/commit/7e87ece94287623423d70641b0abcc05e27ba9f4.diff
LOG: [clang] Remove unused declarations in CGDebugInfo (NFC) (#239487)
SaveAndRestoreLocation: The class was removed on January 14, 2015 in
commit 66e4197f07f6a3fe178f2b220fce62a1889b5fe6, leaving its friend
declaration in CGDebugInfo dangling.
CGDebugInfo::OCLNDRangeDITy: The last use was removed on February 16,
2017 in commit 58984e7087bc530ac2fae06b3ef15a4f1bc118f9.
CGDebugInfo::Int8_4PackedTy and CGDebugInfo::UInt8_4PackedTy: These
fields were added via HLSLPackedTypes.def on September 30, 2026 in
commit 9488c46651de0fbec038e6b8578c1e651d89e576 without any uses.
Note that CGDebugInfo becomes fully defined in CGDebugInfo.cpp once we
remove the friend declaration for SaveAndRestoreLocation. That in turn
causes -Wunused-private-field to diagnose the unused private fields
removed here.
Assisted-by: Antigravity
Added:
Modified:
clang/lib/CodeGen/CGDebugInfo.h
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h
index bf92336743958..3f11cea5bcb7f 100644
--- a/clang/lib/CodeGen/CGDebugInfo.h
+++ b/clang/lib/CodeGen/CGDebugInfo.h
@@ -58,7 +58,6 @@ class CGBlockInfo;
/// backend.
class CGDebugInfo {
friend class ApplyDebugLocation;
- friend class SaveAndRestoreLocation;
friend class ApplyAtomGroup;
CodeGenModule &CGM;
@@ -84,7 +83,6 @@ class CGDebugInfo {
llvm::DIType *OCLEventDITy = nullptr;
llvm::DIType *OCLClkEventDITy = nullptr;
llvm::DIType *OCLQueueDITy = nullptr;
- llvm::DIType *OCLNDRangeDITy = nullptr;
llvm::DIType *OCLReserveIDDITy = nullptr;
#define EXT_OPAQUE_TYPE(ExtType, Id, Ext) \
llvm::DIType *Id##Ty = nullptr;
@@ -97,9 +95,6 @@ class CGDebugInfo {
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
llvm::DIType *SingletonId = nullptr;
#include "clang/Basic/HLSLIntangibleTypes.def"
-#define HLSL_PACKED_TYPE(Name, Id, SingletonId) \
- llvm::DIType *SingletonId = nullptr;
-#include "clang/Basic/HLSLPackedTypes.def"
#define SPIRV_TYPE(Name, Id, SingletonId) llvm::DIType *SingletonId = nullptr;
#include "clang/Basic/SPIRVTypes.def"
More information about the cfe-commits
mailing list