Skip to content

Commit 7eeedc1

Browse files
committed
[CodeGen] Make some includes explicit (NFC)
Explicitly include some headers or forward-declare types, in preparation for removing an include that pulls in many transitive headers.
1 parent a79a561 commit 7eeedc1

File tree

11 files changed

+17
-0
lines changed

11 files changed

+17
-0
lines changed

llvm/include/llvm/CodeGen/MIRFormatter.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#define LLVM_CODEGEN_MIRFORMATTER_H
1515

1616
#include "llvm/CodeGen/PseudoSourceValue.h"
17+
#include "llvm/Support/ErrorHandling.h"
1718
#include "llvm/Support/raw_ostream.h"
1819
#include <cstdint>
1920
#include <optional>
@@ -22,7 +23,10 @@ namespace llvm {
2223

2324
class MachineFunction;
2425
class MachineInstr;
26+
class ModuleSlotTracker;
2527
struct PerFunctionMIParsingState;
28+
class Twine;
29+
class Value;
2630

2731
/// MIRFormater - Interface to format MIR operand based on target
2832
class MIRFormatter {

llvm/include/llvm/CodeGen/MIRParser/MIParser.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
#include "llvm/ADT/StringMap.h"
1818
#include "llvm/CodeGen/MachineMemOperand.h"
1919
#include "llvm/CodeGen/Register.h"
20+
#include "llvm/IR/TrackingMDRef.h"
2021
#include "llvm/Support/Allocator.h"
2122
#include "llvm/Support/SMLoc.h"
23+
#include <map>
2224
#include <utility>
2325

2426
namespace llvm {

llvm/include/llvm/CodeGen/MachineMemOperand.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include "llvm/CodeGen/LowLevelType.h"
2121
#include "llvm/CodeGen/PseudoSourceValue.h"
2222
#include "llvm/IR/DerivedTypes.h"
23+
#include "llvm/IR/LLVMContext.h"
24+
#include "llvm/IR/Metadata.h"
2325
#include "llvm/IR/Value.h" // PointerLikeTypeTraits<Value*>
2426
#include "llvm/Support/AtomicOrdering.h"
2527
#include "llvm/Support/DataTypes.h"

llvm/include/llvm/CodeGen/ModuloSchedule.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
#include "llvm/CodeGen/TargetInstrInfo.h"
6666
#include "llvm/CodeGen/TargetSubtargetInfo.h"
6767
#include <deque>
68+
#include <map>
6869
#include <vector>
6970

7071
namespace llvm {

llvm/include/llvm/CodeGen/TargetFrameLowering.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef LLVM_CODEGEN_TARGETFRAMELOWERING_H
1414
#define LLVM_CODEGEN_TARGETFRAMELOWERING_H
1515

16+
#include "llvm/ADT/BitVector.h"
1617
#include "llvm/CodeGen/MachineBasicBlock.h"
1718
#include "llvm/Support/TypeSize.h"
1819
#include <vector>

llvm/lib/CodeGen/LiveDebugVariables.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#include <algorithm>
5959
#include <cassert>
6060
#include <iterator>
61+
#include <map>
6162
#include <memory>
6263
#include <optional>
6364
#include <utility>

llvm/lib/Target/AArch64/AArch64SIMDInstrOpt.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#include "llvm/MC/MCSchedule.h"
5151
#include "llvm/Pass.h"
5252
#include <unordered_map>
53+
#include <map>
5354

5455
using namespace llvm;
5556

llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "llvm/CodeGen/TargetSubtargetInfo.h"
3131
#include "llvm/IR/IntrinsicsAArch64.h"
3232
#include "llvm/Support/ErrorHandling.h"
33+
#include "llvm/Support/Threading.h"
3334
#include <algorithm>
3435
#include <cassert>
3536

llvm/lib/Target/AMDGPU/SIRegisterInfo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#ifndef LLVM_LIB_TARGET_AMDGPU_SIREGISTERINFO_H
1515
#define LLVM_LIB_TARGET_AMDGPU_SIREGISTERINFO_H
1616

17+
#include "llvm/ADT/BitVector.h"
18+
1719
#define GET_REGINFO_HEADER
1820
#include "AMDGPUGenRegisterInfo.inc"
1921

llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
#include "llvm/IR/Type.h"
9090
#include "llvm/IR/User.h"
9191
#include "llvm/IR/Value.h"
92+
#include "llvm/IR/ValueHandle.h"
9293
#include "llvm/Pass.h"
9394
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
9495
#include <stack>

llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
#include "llvm/Support/raw_ostream.h"
116116
#include <cassert>
117117
#include <iterator>
118+
#include <map>
118119
#include <set>
119120
#include <utility>
120121

0 commit comments

Comments
 (0)