summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-01-05 17:59:02 +0000
committerDan Gohman <gohman@apple.com>2009-01-05 17:59:02 +0000
commitd68a07650cdb2e18f18f362ba533459aa10e01b6 (patch)
tree0b0b5b402393260240d66dd4889d094b41a2ee82 /include
parent08f053f5d1df120dc8389a3ec8947ab16b1ccc53 (diff)
downloadllvm-d68a07650cdb2e18f18f362ba533459aa10e01b6.tar.gz
llvm-d68a07650cdb2e18f18f362ba533459aa10e01b6.tar.bz2
llvm-d68a07650cdb2e18f18f362ba533459aa10e01b6.tar.xz
Tidy up #includes, deleting a bunch of unnecessary #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61715 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/FoldingSet.h2
-rw-r--r--include/llvm/ADT/STLExtras.h2
-rw-r--r--include/llvm/ADT/SparseBitVector.h2
-rw-r--r--include/llvm/ADT/ilist.h3
-rw-r--r--include/llvm/Analysis/ConstantsScanner.h1
-rw-r--r--include/llvm/Analysis/DominatorInternals.h2
-rw-r--r--include/llvm/Analysis/Dominators.h1
-rw-r--r--include/llvm/Analysis/EscapeAnalysis.h12
-rw-r--r--include/llvm/Analysis/FindUsedTypes.h1
-rw-r--r--include/llvm/Analysis/LoopInfo.h2
-rw-r--r--include/llvm/Analysis/ScalarEvolutionExpander.h3
-rw-r--r--include/llvm/Analysis/SparsePropagation.h4
-rw-r--r--include/llvm/Analysis/ValueTracking.h2
-rw-r--r--include/llvm/AutoUpgrade.h1
-rw-r--r--include/llvm/CodeGen/AsmPrinter.h1
-rw-r--r--include/llvm/CodeGen/BreakCriticalMachineEdge.h6
-rw-r--r--include/llvm/CodeGen/DwarfWriter.h3
-rw-r--r--include/llvm/CodeGen/ELFRelocation.h1
-rw-r--r--include/llvm/CodeGen/FastISel.h1
-rw-r--r--include/llvm/CodeGen/FileWriters.h2
-rw-r--r--include/llvm/CodeGen/GCMetadataPrinter.h2
-rw-r--r--include/llvm/CodeGen/GCStrategy.h1
-rw-r--r--include/llvm/CodeGen/LinkAllAsmWriterComponents.h1
-rw-r--r--include/llvm/CodeGen/LiveIntervalAnalysis.h1
-rw-r--r--include/llvm/CodeGen/LiveVariables.h1
-rw-r--r--include/llvm/CodeGen/MachineConstantPool.h1
-rw-r--r--include/llvm/CodeGen/MachineDominators.h27
-rw-r--r--include/llvm/CodeGen/MachineInstrBuilder.h1
-rw-r--r--include/llvm/CodeGen/MachineLoopInfo.h3
-rw-r--r--include/llvm/CodeGen/RegisterCoalescer.h12
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h1
-rw-r--r--include/llvm/CompilerDriver/Tool.h1
-rw-r--r--include/llvm/Config/alloca.h1
-rw-r--r--include/llvm/Debugger/InferiorProcess.h1
-rw-r--r--include/llvm/ExecutionEngine/ExecutionEngine.h1
-rw-r--r--include/llvm/GlobalAlias.h1
-rw-r--r--include/llvm/GlobalVariable.h1
-rw-r--r--include/llvm/Instructions.h5
-rw-r--r--include/llvm/Pass.h1
-rw-r--r--include/llvm/PassManagers.h7
-rw-r--r--include/llvm/Support/Annotation.h1
-rw-r--r--include/llvm/Support/DataFlow.h1
-rw-r--r--include/llvm/Support/DebugInfoBuilder.h2
-rw-r--r--include/llvm/Support/ELF.h1
-rw-r--r--include/llvm/Support/IRBuilder.h1
-rw-r--r--include/llvm/Support/InstVisitor.h4
-rw-r--r--include/llvm/Support/MutexGuard.h2
-rw-r--r--include/llvm/Support/PassNameParser.h1
-rw-r--r--include/llvm/Support/PredIteratorCache.h1
-rw-r--r--include/llvm/Target/DarwinTargetAsmInfo.h1
-rw-r--r--include/llvm/Target/ELFTargetAsmInfo.h1
-rw-r--r--include/llvm/Target/TargetELFWriterInfo.h2
-rw-r--r--include/llvm/Target/TargetFrameInfo.h2
-rw-r--r--include/llvm/Target/TargetInstrDesc.h2
-rw-r--r--include/llvm/Target/TargetJITInfo.h1
-rw-r--r--include/llvm/Target/TargetLowering.h4
-rw-r--r--include/llvm/Target/TargetMachine.h5
-rw-r--r--include/llvm/Target/TargetRegisterInfo.h5
-rw-r--r--include/llvm/Transforms/Utils/Local.h11
-rw-r--r--include/llvm/TypeSymbolTable.h1
60 files changed, 43 insertions, 128 deletions
diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h
index 4c93711394..63f73b997d 100644
--- a/include/llvm/ADT/FoldingSet.h
+++ b/include/llvm/ADT/FoldingSet.h
@@ -457,6 +457,4 @@ template<typename T> struct FoldingSetTrait<const T*> {
} // End of namespace llvm.
-
#endif
-
diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h
index acfeae5473..ca711b7982 100644
--- a/include/llvm/ADT/STLExtras.h
+++ b/include/llvm/ADT/STLExtras.h
@@ -19,7 +19,7 @@
#include <functional>
#include <utility> // for std::pair
-#include <cstring> // for std::size_t
+#include <cstddef> // for std::size_t
#include "llvm/ADT/iterator.h"
namespace llvm {
diff --git a/include/llvm/ADT/SparseBitVector.h b/include/llvm/ADT/SparseBitVector.h
index efd0accaad..b4b53805c4 100644
--- a/include/llvm/ADT/SparseBitVector.h
+++ b/include/llvm/ADT/SparseBitVector.h
@@ -17,11 +17,11 @@
#include <cassert>
#include <cstring>
-#include <algorithm>
#include "llvm/Support/DataTypes.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/ADT/ilist.h"
+
namespace llvm {
/// SparseBitVector is an implementation of a bitvector that is sparse by only
diff --git a/include/llvm/ADT/ilist.h b/include/llvm/ADT/ilist.h
index 0acbf46a1a..42d09c7b45 100644
--- a/include/llvm/ADT/ilist.h
+++ b/include/llvm/ADT/ilist.h
@@ -40,7 +40,6 @@
#include "llvm/ADT/iterator.h"
#include <cassert>
-#include <cstdlib>
namespace llvm {
@@ -366,7 +365,7 @@ public:
}
void swap(iplist &RHS) {
- abort(); // Swap does not use list traits callback correctly yet!
+ assert(0 && "Swap does not use list traits callback correctly yet!");
std::swap(Head, RHS.Head);
}
diff --git a/include/llvm/Analysis/ConstantsScanner.h b/include/llvm/Analysis/ConstantsScanner.h
index c52b24efe8..bac551f049 100644
--- a/include/llvm/Analysis/ConstantsScanner.h
+++ b/include/llvm/Analysis/ConstantsScanner.h
@@ -17,7 +17,6 @@
#define LLVM_ANALYSIS_CONSTANTSSCANNER_H
#include "llvm/Support/InstIterator.h"
-#include "llvm/Instruction.h"
#include "llvm/ADT/iterator.h"
namespace llvm {
diff --git a/include/llvm/Analysis/DominatorInternals.h b/include/llvm/Analysis/DominatorInternals.h
index 1564774ada..cca0d502b6 100644
--- a/include/llvm/Analysis/DominatorInternals.h
+++ b/include/llvm/Analysis/DominatorInternals.h
@@ -11,8 +11,8 @@
#define LLVM_ANALYSIS_DOMINATOR_INTERNALS_H
#include "llvm/Analysis/Dominators.h"
-#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
+
//===----------------------------------------------------------------------===//
//
// DominatorTree construction - This pass constructs immediate dominator
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h
index 94ab04eb56..35cdb24651 100644
--- a/include/llvm/Analysis/Dominators.h
+++ b/include/llvm/Analysis/Dominators.h
@@ -24,7 +24,6 @@
#include "llvm/Pass.h"
#include "llvm/BasicBlock.h"
#include "llvm/Function.h"
-#include "llvm/Instruction.h"
#include "llvm/Instructions.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/GraphTraits.h"
diff --git a/include/llvm/Analysis/EscapeAnalysis.h b/include/llvm/Analysis/EscapeAnalysis.h
index 871630dd6d..3f4da25310 100644
--- a/include/llvm/Analysis/EscapeAnalysis.h
+++ b/include/llvm/Analysis/EscapeAnalysis.h
@@ -15,13 +15,13 @@
#define LLVM_ANALYSIS_ESCAPEANALYSIS_H
#include "llvm/Pass.h"
-#include "llvm/Instructions.h"
-#include "llvm/Analysis/AliasAnalysis.h"
-#include "llvm/Target/TargetData.h"
#include <set>
namespace llvm {
+class Instruction;
+class Value;
+
/// EscapeAnalysis - This class determines whether an allocation (a MallocInst
/// or an AllocaInst) can escape from the current function. It performs some
/// precomputation, with the rest of the work happening on-demand.
@@ -40,11 +40,7 @@ public:
EscapePoints.clear();
}
- void getAnalysisUsage(AnalysisUsage &AU) const {
- AU.addRequiredTransitive<TargetData>();
- AU.addRequiredTransitive<AliasAnalysis>();
- AU.setPreservesAll();
- }
+ void getAnalysisUsage(AnalysisUsage &AU) const;
//===---------------------------------------------------------------------
// Client API
diff --git a/include/llvm/Analysis/FindUsedTypes.h b/include/llvm/Analysis/FindUsedTypes.h
index 35e4e6f3f9..c897af3a58 100644
--- a/include/llvm/Analysis/FindUsedTypes.h
+++ b/include/llvm/Analysis/FindUsedTypes.h
@@ -20,6 +20,7 @@
namespace llvm {
class Type;
+class Value;
class FindUsedTypes : public ModulePass {
std::set<const Type *> UsedTypes;
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h
index 1b684d73d3..5ba8a7a004 100644
--- a/include/llvm/Analysis/LoopInfo.h
+++ b/include/llvm/Analysis/LoopInfo.h
@@ -54,8 +54,6 @@ static void RemoveFromVector(std::vector<T*> &V, T *N) {
class DominatorTree;
class LoopInfo;
-class PHINode;
-class Instruction;
template<class N> class LoopInfoBase;
template<class N> class LoopBase;
diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h
index 7ecf5332ed..a3ed17d19c 100644
--- a/include/llvm/Analysis/ScalarEvolutionExpander.h
+++ b/include/llvm/Analysis/ScalarEvolutionExpander.h
@@ -14,7 +14,7 @@
#ifndef LLVM_ANALYSIS_SCALAREVOLUTION_EXPANDER_H
#define LLVM_ANALYSIS_SCALAREVOLUTION_EXPANDER_H
-#include "llvm/Instructions.h"
+#include "llvm/Instruction.h"
#include "llvm/Type.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
@@ -119,4 +119,3 @@ namespace llvm {
}
#endif
-
diff --git a/include/llvm/Analysis/SparsePropagation.h b/include/llvm/Analysis/SparsePropagation.h
index a054c76c9b..1476329306 100644
--- a/include/llvm/Analysis/SparsePropagation.h
+++ b/include/llvm/Analysis/SparsePropagation.h
@@ -17,7 +17,7 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
-#include "llvm/ADT/SmallVector.h"
+#include <iosfwd>
#include <vector>
#include <set>
@@ -31,6 +31,8 @@ namespace llvm {
class BasicBlock;
class Function;
class SparseSolver;
+
+ template<typename T> class SmallVectorImpl;
/// AbstractLatticeFunction - This class is implemented by the dataflow instance
/// to specify what the lattice values are and how they handle merges etc.
diff --git a/include/llvm/Analysis/ValueTracking.h b/include/llvm/Analysis/ValueTracking.h
index 1003269e28..8c27b23758 100644
--- a/include/llvm/Analysis/ValueTracking.h
+++ b/include/llvm/Analysis/ValueTracking.h
@@ -15,8 +15,8 @@
#ifndef LLVM_ANALYSIS_VALUETRACKING_H
#define LLVM_ANALYSIS_VALUETRACKING_H
+#include "llvm/Support/DataTypes.h"
#include <string>
-#include <llvm/Support/DataTypes.h>
namespace llvm {
class Value;
diff --git a/include/llvm/AutoUpgrade.h b/include/llvm/AutoUpgrade.h
index 3a97353ac9..f61bd1a08d 100644
--- a/include/llvm/AutoUpgrade.h
+++ b/include/llvm/AutoUpgrade.h
@@ -17,7 +17,6 @@
namespace llvm {
class Function;
class CallInst;
- class BasicBlock;
/// This is a more granular function that simply checks an intrinsic function
/// for upgrading, and returns true if it requires upgrading. It may return
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h
index ac88d8ce23..9d7ff15ffc 100644
--- a/include/llvm/CodeGen/AsmPrinter.h
+++ b/include/llvm/CodeGen/AsmPrinter.h
@@ -30,7 +30,6 @@ namespace llvm {
class ConstantVector;
class GCMetadataPrinter;
class GlobalVariable;
- class GlobalAlias;
class MachineConstantPoolEntry;
class MachineConstantPoolValue;
class MachineModuleInfo;
diff --git a/include/llvm/CodeGen/BreakCriticalMachineEdge.h b/include/llvm/CodeGen/BreakCriticalMachineEdge.h
index d7f50559ba..486129728c 100644
--- a/include/llvm/CodeGen/BreakCriticalMachineEdge.h
+++ b/include/llvm/CodeGen/BreakCriticalMachineEdge.h
@@ -1,4 +1,4 @@
-//===--------- BreakCriticalMachineEdges.h - Break critical edges ---------===//
+//===--------- BreakCriticalMachineEdge.h - Break critical edges ---------===//
//
// The LLVM Compiler Infrastructure
//
@@ -11,8 +11,8 @@
//
//===---------------------------------------------------------------------===//
-#ifndef LLVM_CODEGEN_BREAKCRITICALMACHINEEDGES_H
-#define LLVM_CODEGEN_BREAKCRITICALMACHINEEDGES_H
+#ifndef LLVM_CODEGEN_BREAKCRITICALMACHINEEDGE_H
+#define LLVM_CODEGEN_BREAKCRITICALMACHINEEDGE_H
#include "llvm/CodeGen/MachineJumpTableInfo.h"
#include "llvm/Target/TargetInstrInfo.h"
diff --git a/include/llvm/CodeGen/DwarfWriter.h b/include/llvm/CodeGen/DwarfWriter.h
index f5f5cd30d3..8614eecfb0 100644
--- a/include/llvm/CodeGen/DwarfWriter.h
+++ b/include/llvm/CodeGen/DwarfWriter.h
@@ -20,8 +20,6 @@
#ifndef LLVM_CODEGEN_DWARFWRITER_H
#define LLVM_CODEGEN_DWARFWRITER_H
-#include <iosfwd>
-
namespace llvm {
class AsmPrinter;
@@ -48,7 +46,6 @@ private:
DwarfException *DE;
public:
-
DwarfWriter(raw_ostream &OS, AsmPrinter *A, const TargetAsmInfo *T);
virtual ~DwarfWriter();
diff --git a/include/llvm/CodeGen/ELFRelocation.h b/include/llvm/CodeGen/ELFRelocation.h
index e584e3eb4e..c3f88f1ad6 100644
--- a/include/llvm/CodeGen/ELFRelocation.h
+++ b/include/llvm/CodeGen/ELFRelocation.h
@@ -49,4 +49,3 @@ namespace llvm {
} // end llvm namespace
#endif // LLVM_CODEGEN_ELF_RELOCATION_H
-
diff --git a/include/llvm/CodeGen/FastISel.h b/include/llvm/CodeGen/FastISel.h
index 1cc8310605..c35d43dc28 100644
--- a/include/llvm/CodeGen/FastISel.h
+++ b/include/llvm/CodeGen/FastISel.h
@@ -14,7 +14,6 @@
#ifndef LLVM_CODEGEN_FASTISEL_H
#define LLVM_CODEGEN_FASTISEL_H
-#include "llvm/BasicBlock.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/CodeGen/SelectionDAGNodes.h"
diff --git a/include/llvm/CodeGen/FileWriters.h b/include/llvm/CodeGen/FileWriters.h
index cb7aea476b..b3781e0c60 100644
--- a/include/llvm/CodeGen/FileWriters.h
+++ b/include/llvm/CodeGen/FileWriters.h
@@ -14,8 +14,6 @@
#ifndef LLVM_CODEGEN_FILEWRITERS_H
#define LLVM_CODEGEN_FILEWRITERS_H
-#include <iosfwd>
-
namespace llvm {
class PassManagerBase;
diff --git a/include/llvm/CodeGen/GCMetadataPrinter.h b/include/llvm/CodeGen/GCMetadataPrinter.h
index 1c0665bbd9..b693b1bbfc 100644
--- a/include/llvm/CodeGen/GCMetadataPrinter.h
+++ b/include/llvm/CodeGen/GCMetadataPrinter.h
@@ -23,8 +23,6 @@
#include "llvm/CodeGen/GCMetadata.h"
#include "llvm/CodeGen/GCStrategy.h"
#include "llvm/Support/Registry.h"
-#include <iosfwd>
-#include <string>
namespace llvm {
diff --git a/include/llvm/CodeGen/GCStrategy.h b/include/llvm/CodeGen/GCStrategy.h
index 80249bc29d..cd760dba92 100644
--- a/include/llvm/CodeGen/GCStrategy.h
+++ b/include/llvm/CodeGen/GCStrategy.h
@@ -38,7 +38,6 @@
#include "llvm/CodeGen/GCMetadata.h"
#include "llvm/Support/Registry.h"
-#include <iosfwd>
#include <string>
namespace llvm {
diff --git a/include/llvm/CodeGen/LinkAllAsmWriterComponents.h b/include/llvm/CodeGen/LinkAllAsmWriterComponents.h
index a1ba565d5d..1673c897a7 100644
--- a/include/llvm/CodeGen/LinkAllAsmWriterComponents.h
+++ b/include/llvm/CodeGen/LinkAllAsmWriterComponents.h
@@ -34,4 +34,3 @@ namespace {
}
#endif // LLVM_CODEGEN_LINKALLASMWRITERCOMPONENTS_H
-
diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h
index 6b080478cf..9dd5526149 100644
--- a/include/llvm/CodeGen/LiveIntervalAnalysis.h
+++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h
@@ -24,7 +24,6 @@
#include "llvm/CodeGen/LiveInterval.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Allocator.h"
#include <cmath>
diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h
index 346fd9661d..0d932cf198 100644
--- a/include/llvm/CodeGen/LiveVariables.h
+++ b/include/llvm/CodeGen/LiveVariables.h
@@ -32,7 +32,6 @@
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
namespace llvm {
diff --git a/include/llvm/CodeGen/MachineConstantPool.h b/include/llvm/CodeGen/MachineConstantPool.h
index 79f4eef608..cfa192aca6 100644
--- a/include/llvm/CodeGen/MachineConstantPool.h
+++ b/include/llvm/CodeGen/MachineConstantPool.h
@@ -20,7 +20,6 @@
namespace llvm {
-class AsmPrinter;
class Constant;
class FoldingSetNodeID;
class TargetData;
diff --git a/include/llvm/CodeGen/MachineDominators.h b/include/llvm/CodeGen/MachineDominators.h
index 7d1d9fe9cc..5981e5a3a5 100644
--- a/include/llvm/CodeGen/MachineDominators.h
+++ b/include/llvm/CodeGen/MachineDominators.h
@@ -16,9 +16,6 @@
#define LLVM_CODEGEN_MACHINEDOMINATORS_H
#include "llvm/CodeGen/MachineFunctionPass.h"
-#include "llvm/CodeGen/MachineBasicBlock.h"
-#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/Analysis/Dominators.h"
#include "llvm/Analysis/DominatorInternals.h"
@@ -45,21 +42,13 @@ public:
static char ID; // Pass ID, replacement for typeid
DominatorTreeBase<MachineBasicBlock>* DT;
- MachineDominatorTree() : MachineFunctionPass(intptr_t(&ID)) {
- DT = new DominatorTreeBase<MachineBasicBlock>(false);
- }
+ MachineDominatorTree();
- ~MachineDominatorTree() {
- DT->releaseMemory();
- delete DT;
- }
+ ~MachineDominatorTree();
DominatorTreeBase<MachineBasicBlock>& getBase() { return *DT; }
- virtual void getAnalysisUsage(AnalysisUsage &AU) const {
- AU.setPreservesAll();
- MachineFunctionPass::getAnalysisUsage(AU);
- }
+ virtual void getAnalysisUsage(AnalysisUsage &AU) const;
/// getRoots - Return the root blocks of the current CFG. This may include
/// multiple blocks if we are computing post dominators. For forward
@@ -77,11 +66,7 @@ public:
return DT->getRootNode();
}
- virtual bool runOnMachineFunction(MachineFunction &F) {
- DT->recalculate(F);
-
- return false;
- }
+ virtual bool runOnMachineFunction(MachineFunction &F);
inline bool dominates(MachineDomTreeNode* A, MachineDomTreeNode* B) const {
return DT->dominates(A, B);
@@ -173,9 +158,7 @@ public:
}
- virtual void releaseMemory() {
- DT->releaseMemory();
- }
+ virtual void releaseMemory();
virtual void print(std::ostream &OS, const Module* M= 0) const {
DT->print(OS, M);
diff --git a/include/llvm/CodeGen/MachineInstrBuilder.h b/include/llvm/CodeGen/MachineInstrBuilder.h
index ffe5fbe044..d097362a55 100644
--- a/include/llvm/CodeGen/MachineInstrBuilder.h
+++ b/include/llvm/CodeGen/MachineInstrBuilder.h
@@ -17,7 +17,6 @@
#ifndef LLVM_CODEGEN_MACHINEINSTRBUILDER_H
#define LLVM_CODEGEN_MACHINEINSTRBUILDER_H
-#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
namespace llvm {
diff --git a/include/llvm/CodeGen/MachineLoopInfo.h b/include/llvm/CodeGen/MachineLoopInfo.h
index fa2d2290e3..dc5350722e 100644
--- a/include/llvm/CodeGen/MachineLoopInfo.h
+++ b/include/llvm/CodeGen/MachineLoopInfo.h
@@ -31,9 +31,6 @@
#define LLVM_CODEGEN_MACHINE_LOOP_INFO_H
#include "llvm/CodeGen/MachineFunctionPass.h"
-#include "llvm/CodeGen/MachineBasicBlock.h"
-#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/Analysis/LoopInfo.h"
namespace llvm {
diff --git a/include/llvm/CodeGen/RegisterCoalescer.h b/include/llvm/CodeGen/RegisterCoalescer.h
index 01d55fdb1c..2e9ea555f0 100644
--- a/include/llvm/CodeGen/RegisterCoalescer.h
+++ b/include/llvm/CodeGen/RegisterCoalescer.h
@@ -13,22 +13,18 @@
//===----------------------------------------------------------------------===//
#include "llvm/System/IncludeFile.h"
-#include "llvm/CodeGen/MachineInstr.h"
-#include "llvm/CodeGen/LiveIntervalAnalysis.h"
-#include "llvm/CodeGen/LiveVariables.h"
-#include "llvm/Target/TargetRegisterInfo.h"
+#include "llvm/CodeGen/LiveInterval.h"
+#include "llvm/ADT/SmallPtrSet.h"
#ifndef LLVM_CODEGEN_REGISTER_COALESCER_H
#define LLVM_CODEGEN_REGISTER_COALESCER_H
-namespace llvm
-{
+namespace llvm {
+
class MachineFunction;
class RegallocQuery;
class AnalysisUsage;
- class LiveIntervals;
class MachineInstr;
- class TargetRegisterInfo;
/// An abstract interface for register coalescers. Coalescers must
/// implement this interface to be part of the coalescer analysis
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index 74693dc8bf..6acbc3fc3f 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -19,7 +19,6 @@
#ifndef LLVM_CODEGEN_SELECTIONDAGNODES_H
#define LLVM_CODEGEN_SELECTIONDAGNODES_H
-#include "llvm/Value.h"
#include "llvm/Constants.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/GraphTraits.h"
diff --git a/include/llvm/CompilerDriver/Tool.h b/include/llvm/CompilerDriver/Tool.h
index 8e8f6e73c2..6756d1ca94 100644
--- a/include/llvm/CompilerDriver/Tool.h
+++ b/include/llvm/CompilerDriver/Tool.h
@@ -20,7 +20,6 @@
#include "llvm/ADT/StringSet.h"
#include "llvm/System/Path.h"
-#include <string>
#include <vector>
namespace llvmc {
diff --git a/include/llvm/Config/alloca.h b/include/llvm/Config/alloca.h
index 321cec121d..9990507ef0 100644
--- a/include/llvm/Config/alloca.h
+++ b/include/llvm/Config/alloca.h
@@ -47,4 +47,3 @@
#endif
#endif
-
diff --git a/include/llvm/Debugger/InferiorProcess.h b/include/llvm/Debugger/InferiorProcess.h
index a775d89153..71d138b109 100644
--- a/include/llvm/Debugger/InferiorProcess.h
+++ b/include/llvm/Debugger/InferiorProcess.h
@@ -135,4 +135,3 @@ namespace llvm {
} // end namespace llvm
#endif
-
diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h
index 327e9c6aa9..a26c755ee7 100644
--- a/include/llvm/ExecutionEngine/ExecutionEngine.h
+++ b/include/llvm/ExecutionEngine/ExecutionEngine.h
@@ -17,7 +17,6 @@
#include <vector>
#include <map>
-#include <cassert>
#include <string>
#include "llvm/System/Mutex.h"
#include "llvm/ADT/SmallVector.h"
diff --git a/include/llvm/GlobalAlias.h b/include/llvm/GlobalAlias.h
index d689ad7565..b106116f37 100644
--- a/include/llvm/GlobalAlias.h
+++ b/include/llvm/GlobalAlias.h
@@ -23,7 +23,6 @@ namespace llvm {
class Module;
class Constant;
-class PointerType;
template<typename ValueSubClass, typename ItemParentClass>
class SymbolTableListTraits;
diff --git a/include/llvm/GlobalVariable.h b/include/llvm/GlobalVariable.h
index 1f9bfd4f50..bcbf321346 100644
--- a/include/llvm/GlobalVariable.h
+++ b/include/llvm/GlobalVariable.h
@@ -28,7 +28,6 @@ namespace llvm {
class Module;
class Constant;
-class PointerType;
template<typename ValueSubClass, typename ItemParentClass>
class SymbolTableListTraits;
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index b833c672ba..237c1a8098 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -16,19 +16,16 @@
#ifndef LLVM_INSTRUCTIONS_H
#define LLVM_INSTRUCTIONS_H
-#include <iterator>
-
#include "llvm/InstrTypes.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Attributes.h"
#include "llvm/BasicBlock.h"
#include "llvm/ADT/SmallVector.h"
+#include <iterator>
namespace llvm {
class ConstantInt;
-class PointerType;
-class VectorType;
class ConstantRange;
class APInt;
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h
index 66cb189409..dd012da93c 100644
--- a/include/llvm/Pass.h
+++ b/include/llvm/Pass.h
@@ -38,7 +38,6 @@
namespace llvm {
-class Value;
class BasicBlock;
class Function;
class Module;
diff --git a/include/llvm/PassManagers.h b/include/llvm/PassManagers.h
index e0c1bf2de5..22d5062b6b 100644
--- a/include/llvm/PassManagers.h
+++ b/include/llvm/PassManagers.h
@@ -1,4 +1,4 @@
-//===- llvm/PassManager.h - Pass Inftrastructre classes --------*- C++ -*-===//
+//===- llvm/PassManagers.h - Pass Infrastructure classes -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef PASSMANAGERS_H
-#define PASSMANAGERS_H
+#ifndef LLVM_PASSMANAGERS_H
+#define LLVM_PASSMANAGERS_H
#include "llvm/PassManager.h"
#include "llvm/ADT/SmallVector.h"
@@ -428,4 +428,3 @@ extern void StartPassTimer(llvm::Pass *);
extern void StopPassTimer(llvm::Pass *);
#endif
-
diff --git a/include/llvm/Support/Annotation.h b/include/llvm/Support/Annotation.h
index dcdcf22454..ffc92965e6 100644
--- a/include/llvm/Support/Annotation.h
+++ b/include/llvm/Support/Annotation.h
@@ -22,7 +22,6 @@
#ifndef LLVM_SUPPORT_ANNOTATION_H
#define LLVM_SUPPORT_ANNOTATION_H
-#include <string>
#include <cassert>
namespace llvm {
diff --git a/include/llvm/Support/DataFlow.h b/include/llvm/Support/DataFlow.h
index 8d0ae0c70c..110e0e11a5 100644
--- a/include/llvm/Support/DataFlow.h
+++ b/include/llvm/Support/DataFlow.h
@@ -15,7 +15,6 @@
#define LLVM_SUPPORT_DATAFLOW_H
#include "llvm/User.h"
-#include "llvm/Value.h"
#include "llvm/ADT/GraphTraits.h"
namespace llvm {
diff --git a/include/llvm/Support/DebugInfoBuilder.h b/include/llvm/Support/DebugInfoBuilder.h
index 875ae4180f..4c12ca46ae 100644
--- a/include/llvm/Support/DebugInfoBuilder.h
+++ b/include/llvm/Support/DebugInfoBuilder.h
@@ -15,7 +15,7 @@
#ifndef LLVM_SUPPORT_DEBUGINFOBUILDER_H
#define LLVM_SUPPORT_DEBUGINFOBUILDER_H
-#include <llvm/Module.h>
+#include "llvm/Module.h"
#include <string>
namespace llvm {
diff --git a/include/llvm/Support/ELF.h b/include/llvm/Support/ELF.h
index 3a9c970321..3552c872ee 100644
--- a/include/llvm/Support/ELF.h
+++ b/include/llvm/Support/ELF.h
@@ -23,7 +23,6 @@
#include "llvm/Support/DataTypes.h"
#include <cstring>
-#include <cstdlib>
namespace llvm {
diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h
index 5496a541c0..719e4832da 100644
--- a/include/llvm/Support/IRBuilder.h
+++ b/include/llvm/Support/IRBuilder.h
@@ -15,7 +15,6 @@
#ifndef LLVM_SUPPORT_IRBUILDER_H
#define LLVM_SUPPORT_IRBUILDER_H
-#include "llvm/BasicBlock.h"
#include "llvm/Constants.h"
#include "llvm/Instructions.h"
#include "llvm/GlobalVariable.h"
diff --git a/include/llvm/Support/InstVisitor.h b/include/llvm/Support/InstVisitor.h
index 932e7fbb7f..0b8a9bdead 100644
--- a/include/llvm/Support/InstVisitor.h
+++ b/include/llvm/Support/InstVisitor.h
@@ -23,10 +23,6 @@ namespace llvm {
#define HANDLE_INST(NUM, OPCODE, CLASS) class CLASS;
#include "llvm/Instruction.def"
-// Forward declare the intermediate types...
-class TerminatorInst; class BinaryOperator;
-class AllocationInst;
-
#define DELEGATE(CLASS_TO_VISIT) \
return static_cast<SubClass*>(this)-> \
visit##CLASS_TO_VISIT(static_cast<CLASS_TO_VISIT&>(I))
diff --git a/include/llvm/Support/MutexGuard.h b/include/llvm/Support/MutexGuard.h
index 723794177c..9958b97a3e 100644
--- a/include/llvm/Support/MutexGuard.h
+++ b/include/llvm/Support/MutexGuard.h
@@ -15,7 +15,7 @@
#ifndef LLVM_SUPPORT_MUTEXGUARD_H
#define LLVM_SUPPORT_MUTEXGUARD_H
-#include <llvm/System/Mutex.h>
+#include "llvm/System/Mutex.h"
namespace llvm {
/// Instances of this class acquire a given Mutex Lock when constructed and
diff --git a/include/llvm/Support/PassNameParser.h b/include/llvm/Support/PassNameParser.h
index 961638c43f..e489e0a6f0 100644
--- a/include/llvm/Support/PassNameParser.h
+++ b/include/llvm/Support/PassNameParser.h
@@ -129,4 +129,5 @@ public:
};
} // End llvm namespace
+
#endif
diff --git a/include/llvm/Support/PredIteratorCache.h b/include/llvm/Support/PredIteratorCache.h
index 2de2a02461..9eb7a77044 100644
--- a/include/llvm/Support/PredIteratorCache.h
+++ b/include/llvm/Support/PredIteratorCache.h
@@ -59,4 +59,3 @@ namespace llvm {
} // end namespace llvm
#endif
-
diff --git a/include/llvm/Target/DarwinTargetAsmInfo.h b/include/llvm/Target/DarwinTargetAsmInfo.h
index 5813ce3505..6241ffe29b 100644
--- a/include/llvm/Target/DarwinTargetAsmInfo.h
+++ b/include/llvm/Target/DarwinTargetAsmInfo.h
@@ -16,7 +16,6 @@
#define LLVM_DARWIN_TARGET_ASM_INFO_H
#include "llvm/Target/TargetAsmInfo.h"
-#include "llvm/Target/TargetMachine.h"
namespace llvm {
class GlobalValue;
diff --git a/include/llvm/Target/ELFTargetAsmInfo.h b/include/llvm/Target/ELFTargetAsmInfo.h
index d065df3cc3..2eeff85d66 100644
--- a/include/llvm/Target/ELFTargetAsmInfo.h
+++ b/include/llvm/Target/ELFTargetAsmInfo.h
@@ -16,7 +16,6 @@
#define LLVM_ELF_TARGET_ASM_INFO_H
#include "llvm/Target/TargetAsmInfo.h"
-#include "llvm/Target/TargetMachine.h"
namespace llvm {
class GlobalValue;
diff --git a/include/llvm/Target/TargetELFWriterInfo.h b/include/llvm/Target/TargetELFWriterInfo.h
index f08e2e957c..548cc077a9 100644
--- a/include/llvm/Target/TargetELFWriterInfo.h
+++ b/include/llvm/Target/TargetELFWriterInfo.h
@@ -16,8 +16,6 @@
namespace llvm {
- class MachineBasicBlock;
-
//===--------------------------------------------------------------------===//
// TargetELFWriterInfo
//===--------------------------------------------------------------------===//
diff --git a/include/llvm/Target/TargetFrameInfo.h b/include/llvm/Target/TargetFrameInfo.h
index 836d8721d6..3e26b9dd01 100644
--- a/include/llvm/Target/TargetFrameInfo.h
+++ b/include/llvm/Target/TargetFrameInfo.h
@@ -18,8 +18,6 @@
namespace llvm {
-class MachineFunction;
-
/// Information about stack frame layout on the target. It holds the direction
/// of stack growth, the known stack alignment on entry to each function, and
/// the offset to the locals area.
diff --git a/include/llvm/Target/TargetInstrDesc.h b/include/llvm/Target/TargetInstrDesc.h
index 8378206bf1..2f6e00c01a 100644
--- a/include/llvm/Target/TargetInstrDesc.h
+++ b/include/llvm/Target/TargetInstrDesc.h
@@ -15,8 +15,6 @@
#ifndef LLVM_TARGET_TARGETINSTRDESC_H
#define LLVM_TARGET_TARGETINSTRDESC_H
-#include <cassert>
-
namespace llvm {
class TargetRegisterClass;
diff --git a/include/llvm/Target/TargetJITInfo.h b/include/llvm/Target/TargetJITInfo.h
index e60933799e..1d06cd790d 100644
--- a/include/llvm/Target/TargetJITInfo.h
+++ b/include/llvm/Target/TargetJITInfo.h
@@ -23,7 +23,6 @@
namespace llvm {
class Function;
class GlobalValue;
- class MachineBasicBlock;
class MachineCodeEmitter;
class MachineRelocation;
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index fbc933d5d5..cbcfc53bf3 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -22,9 +22,7 @@
#ifndef LLVM_TARGET_TARGETLOWERING_H
#define LLVM_TARGET_TARGETLOWERING_H
-#include "llvm/Constants.h"
#include "llvm/InlineAsm.h"
-#include "llvm/Instructions.h"
#include "llvm/CodeGen/SelectionDAGNodes.h"
#include "llvm/CodeGen/RuntimeLibcalls.h"
#include "llvm/ADT/APFloat.h"
@@ -36,6 +34,7 @@
namespace llvm {
class AllocaInst;
+ class CallInst;
class Function;
class FastISel;
class MachineBasicBlock;
@@ -51,7 +50,6 @@ namespace llvm {
class TargetRegisterClass;
class TargetSubtarget;
class Value;
- class VectorType;
//===----------------------------------------------------------------------===//
/// TargetLowering - This class defines information used to lower LLVM code to
diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h
index 38e377d100..b8bfc83aad 100644
--- a/include/llvm/Target/TargetMachine.h
+++ b/include/llvm/Target/TargetMachine.h
@@ -16,7 +16,6 @@
#include "llvm/Target/TargetInstrItineraries.h"
#include <cassert>
-#include <iosfwd>
namespace llvm {
@@ -78,7 +77,7 @@ class TargetMachine {
TargetMachine(const TargetMachine &); // DO NOT IMPLEMENT
void operator=(const TargetMachine &); // DO NOT IMPLEMENT
protected: // Can only create subclasses.
- TargetMachine() : AsmInfo(NULL) { }
+ TargetMachine() : AsmInfo(0) { }
/// getSubtargetImpl - virtual method implemented by subclasses that returns
/// a reference to that target's TargetSubtarget-derived member variable.
@@ -90,7 +89,7 @@ protected: // Can only create subclasses.
/// createTargetAsmInfo - Create a new instance of target specific asm
/// information.
- virtual const TargetAsmInfo *createTargetAsmInfo() const { return NULL; }
+ virtual const TargetAsmInfo *createTargetAsmInfo() const { return 0; }
public:
virtual ~TargetMachine();
diff --git a/include/llvm/Target/TargetRegisterInfo.h b/include/llvm/Target/TargetRegisterInfo.h
index 105baef2bc..fbc0bbc6f4 100644
--- a/include/llvm/Target/TargetRegisterInfo.h
+++ b/include/llvm/Target/TargetRegisterInfo.h
@@ -16,7 +16,6 @@
#ifndef LLVM_TARGET_TARGETREGISTERINFO_H
#define LLVM_TARGET_TARGETREGISTERINFO_H
-#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/ValueTypes.h"
#include <cassert>
@@ -26,12 +25,8 @@ namespace llvm {
class BitVector;
class MachineFunction;
-class MachineInstr;
class MachineMove;
class RegScavenger;
-class SDNode;
-class SelectionDAG;
-class Type;
/// TargetRegisterDesc - This record contains all of the information known about
/// a particular register. The AliasSet field (if not null) contains a pointer
diff --git a/include/llvm/Transforms/Utils/Local.h b/include/llvm/Transforms/Utils/Local.h
index 3ccc61280f..35d2c0ce7e 100644
--- a/include/llvm/Transforms/Utils/Local.h
+++ b/include/llvm/Transforms/Utils/Local.h
@@ -15,15 +15,18 @@
#ifndef LLVM_TRANSFORMS_UTILS_LOCAL_H
#define LLVM_TRANSFORMS_UTILS_LOCAL_H
-#include "llvm/Function.h"
-
namespace llvm {
+class BasicBlock;
+class Instruction;
+class Value;
class Pass;
class PHINode;
class AllocaInst;
class ConstantExpr;
class TargetData;
+
+template<typename T> class SmallVectorImpl;
//===----------------------------------------------------------------------===//
// Local constant propagation.
@@ -84,12 +87,12 @@ bool SimplifyCFG(BasicBlock *BB);
/// the alloca inserted to create a stack slot for X.
///
AllocaInst *DemoteRegToStack(Instruction &X, bool VolatileLoads = false,
- Instruction *AllocaPoint = NULL);
+ Instruction *AllocaPoint = 0);
/// DemotePHIToStack - This function takes a virtual register computed by a phi
/// node and replaces it with a slot in the stack frame, allocated via alloca.
/// The phi node is deleted and it returns the pointer to the alloca inserted.
-AllocaInst *DemotePHIToStack(PHINode *P, Instruction *AllocaPoint = NULL);
+AllocaInst *DemotePHIToStack(PHINode *P, Instruction *AllocaPoint = 0);
} // End llvm namespace
diff --git a/include/llvm/TypeSymbolTable.h b/include/llvm/TypeSymbolTable.h
index f4e6410028..0ed44ba96a 100644
--- a/include/llvm/TypeSymbolTable.h
+++ b/include/llvm/TypeSymbolTable.h
@@ -134,4 +134,3 @@ private:
} // End llvm namespace
#endif
-