From b4e780697d1cf0c06e7ca3a908ece0ab65a470ff Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 30 Jan 2021 09:53:40 -0800 Subject: [PATCH] [AMDGPU] Forward-declare AMDGPUTargetMachine (NFC) AMDGPUTargetTransformInfo.h needs AMDGPUTargetMachine but relies on a forward declaration of AMDGPUTargetMachine in AMDGPU.h. This patch adds a forward declaration right in AMDGPUTargetTransformInfo.h. While we are at it, this patch removes the one in AMDGPU.h, where it is unnecessary. --- llvm/lib/Target/AMDGPU/AMDGPU.h | 1 - llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/AMDGPU/AMDGPU.h b/llvm/lib/Target/AMDGPU/AMDGPU.h index 677c493..79846b8 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPU.h +++ b/llvm/lib/Target/AMDGPU/AMDGPU.h @@ -15,7 +15,6 @@ namespace llvm { -class AMDGPUTargetMachine; class FunctionPass; class GCNTargetMachine; class ImmutablePass; diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h index b29c941..9eaad39 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h @@ -25,6 +25,7 @@ namespace llvm { class AMDGPUTargetLowering; +class AMDGPUTargetMachine; class GCNSubtarget; class InstCombiner; class Loop; -- 2.7.4