Repository navigation
[clang] Remove unused declarations in CGDebugInfo (NFC) - #239487
kazutakahirata wants to merge 1 commit into
Conversation
SaveAndRestoreLocation: The class was removed on January 14, 2015 in commit 66e4197, leaving its friend declaration in CGDebugInfo dangling. CGDebugInfo::OCLNDRangeDITy: The last use was removed on February 16, 2017 in commit 58984e7. CGDebugInfo::Int8_4PackedTy and CGDebugInfo::UInt8_4PackedTy: These fields were added via HLSLPackedTypes.def on September 30, 2026 in commit 9488c46 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
|
@llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) ChangesSaveAndRestoreLocation: The class was removed on January 14, 2015 in CGDebugInfo::OCLNDRangeDITy: The last use was removed on February 16, CGDebugInfo::Int8_4PackedTy and CGDebugInfo::UInt8_4PackedTy: These Note that CGDebugInfo becomes fully defined in CGDebugInfo.cpp once we Assisted-by: Antigravity Full diff: https://github.com/llvm/llvm-project/pull/239487.diff 1 Files Affected:
diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h
index b70671821c920..316f7133b9bd6 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"
|
|
@llvm/pr-subscribers-debuginfo Author: Kazu Hirata (kazutakahirata) ChangesSaveAndRestoreLocation: The class was removed on January 14, 2015 in CGDebugInfo::OCLNDRangeDITy: The last use was removed on February 16, CGDebugInfo::Int8_4PackedTy and CGDebugInfo::UInt8_4PackedTy: These Note that CGDebugInfo becomes fully defined in CGDebugInfo.cpp once we Assisted-by: Antigravity Full diff: https://github.com/llvm/llvm-project/pull/239487.diff 1 Files Affected:
diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h
index b70671821c920..316f7133b9bd6 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"
|
SaveAndRestoreLocation: The class was removed on January 14, 2015 in
commit 66e4197, leaving its friend
declaration in CGDebugInfo dangling.
CGDebugInfo::OCLNDRangeDITy: The last use was removed on February 16,
2017 in commit 58984e7.
CGDebugInfo::Int8_4PackedTy and CGDebugInfo::UInt8_4PackedTy: These
fields were added via HLSLPackedTypes.def on September 30, 2026 in
commit 9488c46 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