From 3ea2dceca089c9db6799b96cc44380490bca1804 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 29 May 2008 19:52:31 +0000 Subject: [PATCH] Prune and tidy #includes. llvm-svn: 51697 --- include/llvm/ADT/BitVector.h | 5 ++--- include/llvm/Analysis/ScalarEvolution.h | 3 +-- include/llvm/Analysis/ScalarEvolutionExpander.h | 3 --- include/llvm/CodeGen/LiveInterval.h | 2 -- include/llvm/CodeGen/MachineCodeEmitter.h | 1 - include/llvm/CodeGen/MachineInstr.h | 1 + include/llvm/CodeGen/MachineOperand.h | 1 - include/llvm/CodeGen/SelectionDAG.h | 1 - include/llvm/System/Program.h | 1 - include/llvm/Target/TargetJITInfo.h | 1 - include/llvm/Target/TargetMachine.h | 2 +- include/llvm/Transforms/Scalar.h | 4 +--- include/llvm/Transforms/Utils/FunctionUtils.h | 2 +- include/llvm/Value.h | 2 +- 14 files changed, 8 insertions(+), 21 deletions(-) diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h index fccb1c6e8ab..a2f273df4a2 100644 --- a/include/llvm/ADT/BitVector.h +++ b/include/llvm/ADT/BitVector.h @@ -17,7 +17,6 @@ #include "llvm/Support/MathExtras.h" #include #include -#include #include namespace llvm { @@ -65,7 +64,7 @@ public: /// BitVector default ctor - Creates an empty bitvector. BitVector() : Size(0), Capacity(0) { - Bits = NULL; + Bits = 0; } /// BitVector ctor - Creates a bitvector of specified number of bits. All @@ -81,7 +80,7 @@ public: /// BitVector copy ctor. BitVector(const BitVector &RHS) : Size(RHS.size()) { if (Size == 0) { - Bits = NULL; + Bits = 0; Capacity = 0; return; } diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h index 4d9d5e5fc04..a8e45e0fa64 100644 --- a/include/llvm/Analysis/ScalarEvolution.h +++ b/include/llvm/Analysis/ScalarEvolution.h @@ -24,8 +24,7 @@ #include "llvm/Pass.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Support/DataTypes.h" -#include "llvm/Support/Streams.h" -#include +#include namespace llvm { class APInt; diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h index ed520f5dc2a..daff373348b 100644 --- a/include/llvm/Analysis/ScalarEvolutionExpander.h +++ b/include/llvm/Analysis/ScalarEvolutionExpander.h @@ -14,13 +14,10 @@ #ifndef LLVM_ANALYSIS_SCALAREVOLUTION_EXPANDER_H #define LLVM_ANALYSIS_SCALAREVOLUTION_EXPANDER_H -#include "llvm/BasicBlock.h" -#include "llvm/Constants.h" #include "llvm/Instructions.h" #include "llvm/Type.h" #include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Analysis/ScalarEvolutionExpressions.h" -#include "llvm/Support/CFG.h" namespace llvm { /// SCEVExpander - This class uses information about analyze scalars to diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index 31d6947a76c..e941a458dfb 100644 --- a/include/llvm/CodeGen/LiveInterval.h +++ b/include/llvm/CodeGen/LiveInterval.h @@ -23,9 +23,7 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/Support/Allocator.h" -#include "llvm/Support/Streams.h" #include -#include #include namespace llvm { diff --git a/include/llvm/CodeGen/MachineCodeEmitter.h b/include/llvm/CodeGen/MachineCodeEmitter.h index e38eb061baa..86684d7b9e4 100644 --- a/include/llvm/CodeGen/MachineCodeEmitter.h +++ b/include/llvm/CodeGen/MachineCodeEmitter.h @@ -18,7 +18,6 @@ #define LLVM_CODEGEN_MACHINECODEEMITTER_H #include "llvm/Support/DataTypes.h" -#include namespace llvm { diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 0c657db6dcb..6e46ab39c89 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -18,6 +18,7 @@ #include "llvm/CodeGen/MachineOperand.h" #include "llvm/CodeGen/MachineMemOperand.h" +#include namespace llvm { diff --git a/include/llvm/CodeGen/MachineOperand.h b/include/llvm/CodeGen/MachineOperand.h index d62c8f8b474..28d63524bc4 100644 --- a/include/llvm/CodeGen/MachineOperand.h +++ b/include/llvm/CodeGen/MachineOperand.h @@ -15,7 +15,6 @@ #define LLVM_CODEGEN_MACHINEOPERAND_H #include "llvm/Support/DataTypes.h" -#include #include #include diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index b68ed60681c..77405e46a34 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -22,7 +22,6 @@ #include #include #include -#include #include namespace llvm { diff --git a/include/llvm/System/Program.h b/include/llvm/System/Program.h index 3e9a1f2835e..ecb909c68eb 100644 --- a/include/llvm/System/Program.h +++ b/include/llvm/System/Program.h @@ -15,7 +15,6 @@ #define LLVM_SYSTEM_PROGRAM_H #include "llvm/System/Path.h" -#include namespace llvm { namespace sys { diff --git a/include/llvm/Target/TargetJITInfo.h b/include/llvm/Target/TargetJITInfo.h index 918319f11cc..6e1eb4396c6 100644 --- a/include/llvm/Target/TargetJITInfo.h +++ b/include/llvm/Target/TargetJITInfo.h @@ -17,7 +17,6 @@ #ifndef LLVM_TARGET_TARGETJITINFO_H #define LLVM_TARGET_TARGETJITINFO_H -#include #include #include "llvm/Support/DataTypes.h" diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h index b495f85d349..e86af9fd8db 100644 --- a/include/llvm/Target/TargetMachine.h +++ b/include/llvm/Target/TargetMachine.h @@ -16,7 +16,7 @@ #include "llvm/Target/TargetInstrItineraries.h" #include -#include +#include namespace llvm { diff --git a/include/llvm/Transforms/Scalar.h b/include/llvm/Transforms/Scalar.h index 9a165c91c99..d62cdc7a862 100644 --- a/include/llvm/Transforms/Scalar.h +++ b/include/llvm/Transforms/Scalar.h @@ -15,8 +15,6 @@ #ifndef LLVM_TRANSFORMS_SCALAR_H #define LLVM_TRANSFORMS_SCALAR_H -#include - namespace llvm { class FunctionPass; @@ -271,7 +269,7 @@ extern const PassInfo *const LowerSwitchID; // purpose "my LLVM-to-LLVM pass doesn't support the invoke instruction yet" // lowering pass. // -FunctionPass *createLowerInvokePass(const TargetLowering *TLI = NULL); +FunctionPass *createLowerInvokePass(const TargetLowering *TLI = 0); extern const PassInfo *const LowerInvokePassID; //===----------------------------------------------------------------------===// diff --git a/include/llvm/Transforms/Utils/FunctionUtils.h b/include/llvm/Transforms/Utils/FunctionUtils.h index 09afebeab79..dc7ef238652 100644 --- a/include/llvm/Transforms/Utils/FunctionUtils.h +++ b/include/llvm/Transforms/Utils/FunctionUtils.h @@ -14,12 +14,12 @@ #ifndef LLVM_TRANSFORMS_UTILS_FUNCTION_H #define LLVM_TRANSFORMS_UTILS_FUNCTION_H -#include "llvm/Analysis/Dominators.h" #include "llvm/Analysis/LoopInfo.h" #include namespace llvm { class BasicBlock; + class DominatorTree; class Function; /// ExtractCodeRegion - rip out a sequence of basic blocks into a new function diff --git a/include/llvm/Value.h b/include/llvm/Value.h index efac8e88f76..af90b91c3bf 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -18,7 +18,7 @@ #include "llvm/AbstractTypeUser.h" #include "llvm/Use.h" #include "llvm/Support/Casting.h" -#include "llvm/Support/Streams.h" +#include #include namespace llvm {