[CodeGen] Forward-declare TargetMachine (NFC)
authorKazu Hirata <kazu@google.com>
Sun, 24 Jan 2021 20:18:54 +0000 (12:18 -0800)
committerKazu Hirata <kazu@google.com>
Sun, 24 Jan 2021 20:18:54 +0000 (12:18 -0800)
InstrEmitter.h needs TargetMachine but relies on a forward declaration
of TargetMachine in MachineOperand.h.  This patch adds a forward
declaration right in InstrEmitter.h.

While we are at it, this patch removes the one in MachineOperand.h,
where it is unnecessary.

llvm/include/llvm/CodeGen/MachineOperand.h
llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h

index b7e89cf..b12351b 100644 (file)
@@ -33,7 +33,6 @@ class MachineRegisterInfo;
 class MCCFIInstruction;
 class MDNode;
 class ModuleSlotTracker;
-class TargetMachine;
 class TargetIntrinsicInfo;
 class TargetRegisterInfo;
 class hash_code;
index d969cb6..09658b8 100644 (file)
@@ -26,6 +26,7 @@ class MCInstrDesc;
 class SDDbgLabel;
 class SDDbgValue;
 class TargetLowering;
+class TargetMachine;
 
 class LLVM_LIBRARY_VISIBILITY InstrEmitter {
   MachineFunction *MF;