From 6bde08536655dadca4156ca42d4c6f19f52fde98 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 26 Jan 2021 20:00:16 -0800 Subject: [PATCH] [AMDGPU] Forward-declare TargetRegisterClass (NFC) AMDGPUInstructionSelector.h needs TargetRegisterClass but relies on a forward declaration of TargetRegisterClass in InstructionSelector.h. This patch adds a forward declaration right in AMDGPUInstructionSelector.h. While we are at it, this patch removes the one in InstructionSelector.h, where it is unnecessary. --- llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h | 1 - llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h b/llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h index 5b8243a..3fbc75e 100644 --- a/llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h +++ b/llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h @@ -39,7 +39,6 @@ class MachineOperand; class MachineRegisterInfo; class RegisterBankInfo; class TargetInstrInfo; -class TargetRegisterClass; class TargetRegisterInfo; /// Container class for CodeGen predicate results. diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h index d70f180..b250390 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h @@ -45,6 +45,7 @@ class RegisterBank; class SIInstrInfo; class SIMachineFunctionInfo; class SIRegisterInfo; +class TargetRegisterClass; class AMDGPUInstructionSelector final : public InstructionSelector { private: -- 2.7.4