[CodeGen] Include llvm/CodeGen/DFAPacketizer.h
authorKazu Hirata <kazu@google.com>
Sun, 18 Dec 2022 23:35:29 +0000 (15:35 -0800)
committerKazu Hirata <kazu@google.com>
Sun, 18 Dec 2022 23:35:29 +0000 (15:35 -0800)
This patch teaches MachinePipeliner.h to include
DFAPacketizer.h so that the header file is self contained.

Without this patch, a C++ source file that only includes
MachinePipeliner.h does not compile because the forward declaration of
DFAPacketizer is not enough for:

  llvm::SmallVector<std::unique_ptr<DFAPacketizer>> DFAResources;

llvm/include/llvm/CodeGen/MachinePipeliner.h

index 24a248f..c0d05ae 100644 (file)
@@ -41,6 +41,7 @@
 #define LLVM_CODEGEN_MACHINEPIPELINER_H
 
 #include "llvm/ADT/SetVector.h"
+#include "llvm/CodeGen/DFAPacketizer.h"
 #include "llvm/CodeGen/MachineDominators.h"
 #include "llvm/CodeGen/MachineOptimizationRemarkEmitter.h"
 #include "llvm/CodeGen/RegisterClassInfo.h"