[llvm] 3112987 - Remove unused forward declarations (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 17 15:38:12 PDT 2022


Author: Kazu Hirata
Date: 2022-07-17T15:37:48-07:00
New Revision: 3112987d5c20ec6878420ca71773aa8c73cb49f2

URL: https://github.com/llvm/llvm-project/commit/3112987d5c20ec6878420ca71773aa8c73cb49f2
DIFF: https://github.com/llvm/llvm-project/commit/3112987d5c20ec6878420ca71773aa8c73cb49f2.diff

LOG: Remove unused forward declarations (NFC)

Added: 
    

Modified: 
    llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h
    llvm/include/llvm/CodeGen/GlobalISel/Utils.h
    llvm/include/llvm/CodeGen/MachineModuleInfo.h
    llvm/include/llvm/CodeGen/Passes.h
    llvm/include/llvm/IR/Statepoint.h
    llvm/include/llvm/MC/MCDXContainerStreamer.h
    llvm/include/llvm/MC/MCSPIRVStreamer.h
    llvm/include/llvm/Object/Decompressor.h
    llvm/include/llvm/Support/Compression.h
    llvm/include/llvm/Support/VirtualFileSystem.h
    llvm/include/llvm/Transforms/Instrumentation.h
    llvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h
    llvm/include/llvm/Transforms/Instrumentation/HWAddressSanitizer.h
    llvm/include/llvm/Transforms/Instrumentation/MemorySanitizer.h
    llvm/include/llvm/Transforms/Instrumentation/SanitizerCoverage.h
    llvm/include/llvm/Transforms/Instrumentation/ThreadSanitizer.h
    llvm/lib/Bitcode/Reader/ValueList.h
    llvm/lib/CodeGen/RegAllocGreedy.h
    llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
    llvm/lib/Transforms/Coroutines/CoroInternal.h
    llvm/tools/llvm-reduce/deltas/Delta.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h b/llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h
index a0f5331fdba53..cd32979b9ea5b 100644
--- a/llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h
+++ b/llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h
@@ -20,7 +20,6 @@
 #include "llvm/IR/PassManager.h"
 
 namespace llvm {
-class DominatorTree;
 class Function;
 class LoopInfo;
 

diff  --git a/llvm/include/llvm/CodeGen/GlobalISel/Utils.h b/llvm/include/llvm/CodeGen/GlobalISel/Utils.h
index 78f1b49da822a..31f3d5d84186a 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/Utils.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/Utils.h
@@ -48,7 +48,6 @@ class TargetRegisterInfo;
 class TargetRegisterClass;
 class ConstantFP;
 class APFloat;
-class MachineIRBuilder;
 
 // Convenience macros for dealing with vector reduction opcodes.
 #define GISEL_VECREDUCE_CASES_ALL                                              \

diff  --git a/llvm/include/llvm/CodeGen/MachineModuleInfo.h b/llvm/include/llvm/CodeGen/MachineModuleInfo.h
index cdd0073749d33..61240924e5e15 100644
--- a/llvm/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/llvm/include/llvm/CodeGen/MachineModuleInfo.h
@@ -41,7 +41,6 @@
 
 namespace llvm {
 
-class BasicBlock;
 class Function;
 class LLVMTargetMachine;
 class MachineFunction;

diff  --git a/llvm/include/llvm/CodeGen/Passes.h b/llvm/include/llvm/CodeGen/Passes.h
index 6e37d42f0d294..9822f8013e918 100644
--- a/llvm/include/llvm/CodeGen/Passes.h
+++ b/llvm/include/llvm/CodeGen/Passes.h
@@ -26,7 +26,6 @@ namespace llvm {
 class FunctionPass;
 class MachineFunction;
 class MachineFunctionPass;
-class MemoryBuffer;
 class ModulePass;
 class Pass;
 class TargetMachine;

diff  --git a/llvm/include/llvm/IR/Statepoint.h b/llvm/include/llvm/IR/Statepoint.h
index ba8ffbbaf3973..559840a33cfde 100644
--- a/llvm/include/llvm/IR/Statepoint.h
+++ b/llvm/include/llvm/IR/Statepoint.h
@@ -54,7 +54,6 @@ enum class StatepointFlags {
 // These two are defined in IntrinsicInst since they're part of the
 // IntrinsicInst class hierarchy.
 class GCRelocateInst;
-class GCResultInst;
 
 /// Represents a gc.statepoint intrinsic call.  This extends directly from
 /// CallBase as the IntrinsicInst only supports calls and gc.statepoint is

diff  --git a/llvm/include/llvm/MC/MCDXContainerStreamer.h b/llvm/include/llvm/MC/MCDXContainerStreamer.h
index ef1a95f71778b..ac2fbc6cdff3e 100644
--- a/llvm/include/llvm/MC/MCDXContainerStreamer.h
+++ b/llvm/include/llvm/MC/MCDXContainerStreamer.h
@@ -22,8 +22,6 @@
 #include "llvm/MC/MCObjectWriter.h"
 
 namespace llvm {
-class MCAssembler;
-class MCExpr;
 class MCInst;
 class raw_ostream;
 

diff  --git a/llvm/include/llvm/MC/MCSPIRVStreamer.h b/llvm/include/llvm/MC/MCSPIRVStreamer.h
index 7366e0a9d82c4..fc1e41c636d89 100644
--- a/llvm/include/llvm/MC/MCSPIRVStreamer.h
+++ b/llvm/include/llvm/MC/MCSPIRVStreamer.h
@@ -19,8 +19,6 @@
 #include "llvm/MC/MCObjectWriter.h"
 
 namespace llvm {
-class MCAssembler;
-class MCExpr;
 class MCInst;
 class raw_ostream;
 

diff  --git a/llvm/include/llvm/Object/Decompressor.h b/llvm/include/llvm/Object/Decompressor.h
index f43a989d4526b..35f4ebe2e5d61 100644
--- a/llvm/include/llvm/Object/Decompressor.h
+++ b/llvm/include/llvm/Object/Decompressor.h
@@ -16,8 +16,6 @@
 namespace llvm {
 namespace object {
 
-class SectionRef;
-
 /// Decompressor helps to handle decompression of compressed sections.
 class Decompressor {
 public:

diff  --git a/llvm/include/llvm/Support/Compression.h b/llvm/include/llvm/Support/Compression.h
index c99f811459ab2..cde9fa22cf4c8 100644
--- a/llvm/include/llvm/Support/Compression.h
+++ b/llvm/include/llvm/Support/Compression.h
@@ -19,7 +19,6 @@
 namespace llvm {
 template <typename T> class SmallVectorImpl;
 class Error;
-class StringRef;
 
 namespace compression {
 namespace zlib {

diff  --git a/llvm/include/llvm/Support/VirtualFileSystem.h b/llvm/include/llvm/Support/VirtualFileSystem.h
index 3c99b0d8efdb4..6844a406f38c9 100644
--- a/llvm/include/llvm/Support/VirtualFileSystem.h
+++ b/llvm/include/llvm/Support/VirtualFileSystem.h
@@ -462,7 +462,6 @@ class ProxyFileSystem : public FileSystem {
 namespace detail {
 
 class InMemoryDirectory;
-class InMemoryFile;
 class InMemoryNode;
 
 struct NewInMemoryNodeInfo {

diff  --git a/llvm/include/llvm/Transforms/Instrumentation.h b/llvm/include/llvm/Transforms/Instrumentation.h
index 9e8f7127d9a99..20ea4581c05bd 100644
--- a/llvm/include/llvm/Transforms/Instrumentation.h
+++ b/llvm/include/llvm/Transforms/Instrumentation.h
@@ -28,7 +28,6 @@
 namespace llvm {
 
 class Triple;
-class FunctionPass;
 class ModulePass;
 class OptimizationRemarkEmitter;
 class Comdat;

diff  --git a/llvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h b/llvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h
index d12b2cf458258..f56ec6ff682f8 100644
--- a/llvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h
+++ b/llvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h
@@ -17,12 +17,7 @@
 #include "llvm/Transforms/Instrumentation/AddressSanitizerOptions.h"
 
 namespace llvm {
-class Function;
-class FunctionPass;
-class GlobalVariable;
-class MDNode;
 class Module;
-class ModulePass;
 class raw_ostream;
 
 struct AddressSanitizerOptions {

diff  --git a/llvm/include/llvm/Transforms/Instrumentation/HWAddressSanitizer.h b/llvm/include/llvm/Transforms/Instrumentation/HWAddressSanitizer.h
index d3b5b5ca5c253..11ea66780d8c5 100644
--- a/llvm/include/llvm/Transforms/Instrumentation/HWAddressSanitizer.h
+++ b/llvm/include/llvm/Transforms/Instrumentation/HWAddressSanitizer.h
@@ -17,7 +17,6 @@
 #include "llvm/IR/PassManager.h"
 
 namespace llvm {
-class FunctionPass;
 class Module;
 class StringRef;
 class raw_ostream;

diff  --git a/llvm/include/llvm/Transforms/Instrumentation/MemorySanitizer.h b/llvm/include/llvm/Transforms/Instrumentation/MemorySanitizer.h
index e4654a0fc7ef9..ad92ed1c6330d 100644
--- a/llvm/include/llvm/Transforms/Instrumentation/MemorySanitizer.h
+++ b/llvm/include/llvm/Transforms/Instrumentation/MemorySanitizer.h
@@ -18,7 +18,6 @@
 
 namespace llvm {
 class Function;
-class FunctionPass;
 class Module;
 class StringRef;
 class raw_ostream;

diff  --git a/llvm/include/llvm/Transforms/Instrumentation/SanitizerCoverage.h b/llvm/include/llvm/Transforms/Instrumentation/SanitizerCoverage.h
index 7fc120d66df8b..dfa85fde28e65 100644
--- a/llvm/include/llvm/Transforms/Instrumentation/SanitizerCoverage.h
+++ b/llvm/include/llvm/Transforms/Instrumentation/SanitizerCoverage.h
@@ -22,7 +22,6 @@
 
 namespace llvm {
 class Module;
-class ModulePass;
 
 /// This is the ModuleSanitizerCoverage pass used in the new pass manager. The
 /// pass instruments functions for coverage, adds initialization calls to the

diff  --git a/llvm/include/llvm/Transforms/Instrumentation/ThreadSanitizer.h b/llvm/include/llvm/Transforms/Instrumentation/ThreadSanitizer.h
index b3a067ba59c2d..fd37130d54596 100644
--- a/llvm/include/llvm/Transforms/Instrumentation/ThreadSanitizer.h
+++ b/llvm/include/llvm/Transforms/Instrumentation/ThreadSanitizer.h
@@ -17,7 +17,6 @@
 
 namespace llvm {
 class Function;
-class FunctionPass;
 class Module;
 
 /// A function pass for tsan instrumentation.

diff  --git a/llvm/lib/Bitcode/Reader/ValueList.h b/llvm/lib/Bitcode/Reader/ValueList.h
index 995d46f01f75e..a5b3f6e207077 100644
--- a/llvm/lib/Bitcode/Reader/ValueList.h
+++ b/llvm/lib/Bitcode/Reader/ValueList.h
@@ -21,7 +21,6 @@
 
 namespace llvm {
 
-class Constant;
 class Error;
 class Type;
 class Value;

diff  --git a/llvm/lib/CodeGen/RegAllocGreedy.h b/llvm/lib/CodeGen/RegAllocGreedy.h
index 358e74541a547..3b2ec0d10a08f 100644
--- a/llvm/lib/CodeGen/RegAllocGreedy.h
+++ b/llvm/lib/CodeGen/RegAllocGreedy.h
@@ -54,7 +54,6 @@ class MachineLoop;
 class MachineLoopInfo;
 class MachineOptimizationRemarkEmitter;
 class MachineOptimizationRemarkMissed;
-class SlotIndex;
 class SlotIndexes;
 class TargetInstrInfo;
 class VirtRegMap;

diff  --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
index 33856c12b3c98..d2ed4fe018b50 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
@@ -29,10 +29,6 @@
 using namespace llvm;
 using namespace dwarf;
 
-namespace llvm {
-class DwarfContext;
-}
-
 using FileLineInfoKind = DILineInfoSpecifier::FileLineInfoKind;
 
 namespace {

diff  --git a/llvm/lib/Transforms/Coroutines/CoroInternal.h b/llvm/lib/Transforms/Coroutines/CoroInternal.h
index 5557370c82bae..af35b45c2eaf5 100644
--- a/llvm/lib/Transforms/Coroutines/CoroInternal.h
+++ b/llvm/lib/Transforms/Coroutines/CoroInternal.h
@@ -17,8 +17,6 @@
 namespace llvm {
 
 class CallGraph;
-class CallGraphSCC;
-class PassRegistry;
 
 namespace coro {
 

diff  --git a/llvm/tools/llvm-reduce/deltas/Delta.h b/llvm/tools/llvm-reduce/deltas/Delta.h
index 016400230a4f3..76aaf25044826 100644
--- a/llvm/tools/llvm-reduce/deltas/Delta.h
+++ b/llvm/tools/llvm-reduce/deltas/Delta.h
@@ -23,8 +23,6 @@
 
 namespace llvm {
 
-class MachineFunction;
-
 struct Chunk {
   int Begin;
   int End;


        


More information about the llvm-commits mailing list