diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2003-11-11 22:41:34 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-11-11 22:41:34 +0000 |
commit | d0fde30ce850b78371fd1386338350591f9ff494 (patch) | |
tree | 83bb73e83f54fc8e1e474d116250ae2779562f7e /include/llvm/CodeGen | |
parent | 0d723acf15b0326e2df09ecb614b02a617f536e4 (diff) | |
download | external_llvm-d0fde30ce850b78371fd1386338350591f9ff494.tar.gz external_llvm-d0fde30ce850b78371fd1386338350591f9ff494.tar.bz2 external_llvm-d0fde30ce850b78371fd1386338350591f9ff494.zip |
Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
23 files changed, 109 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/FunctionLiveVarInfo.h b/include/llvm/CodeGen/FunctionLiveVarInfo.h index e79d58f7e4..23a9d93a6e 100644 --- a/include/llvm/CodeGen/FunctionLiveVarInfo.h +++ b/include/llvm/CodeGen/FunctionLiveVarInfo.h @@ -39,6 +39,8 @@ #include "llvm/Pass.h" #include "llvm/CodeGen/ValueSet.h" +namespace llvm { + class BBLiveVar; class MachineInstr; @@ -104,4 +106,6 @@ public: const BasicBlock *BB = 0); }; +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/InstrForest.h b/include/llvm/CodeGen/InstrForest.h index fc82d7c165..48266715bd 100644 --- a/include/llvm/CodeGen/InstrForest.h +++ b/include/llvm/CodeGen/InstrForest.h @@ -29,16 +29,24 @@ #include "llvm/Instruction.h" #include "Support/hash_map" +namespace llvm { + class Constant; class Function; class InstrTreeNode; class InstrForest; +} // End llvm namespace + +using namespace llvm; + //-------------------------------------------------------------------------- // OpLabel values for special-case nodes created for instruction selection. // All op-labels not defined here are identical to the instruction // opcode returned by Instruction::getOpcode() //-------------------------------------------------------------------------- +// + const int InvalidOp = -1; const int VRegListOp = 97; @@ -103,6 +111,7 @@ extern void printtree (InstrTreeNode*); extern int treecost (InstrTreeNode*, int, int); extern void printMatches (InstrTreeNode*); +namespace llvm { //------------------------------------------------------------------------ // class InstrTreeNode @@ -325,4 +334,6 @@ private: InstructionNode* buildTreeForInstruction(Instruction* instr); }; +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/InstrScheduling.h b/include/llvm/CodeGen/InstrScheduling.h index 40ce442f55..816aa7e806 100644 --- a/include/llvm/CodeGen/InstrScheduling.h +++ b/include/llvm/CodeGen/InstrScheduling.h @@ -15,6 +15,8 @@ #ifndef LLVM_CODEGEN_INSTR_SCHEDULING_H #define LLVM_CODEGEN_INSTR_SCHEDULING_H +namespace llvm { + class FunctionPass; class TargetMachine; @@ -30,4 +32,6 @@ class TargetMachine; FunctionPass *createInstructionSchedulingWithSSAPass(const TargetMachine &TM); +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/InstrSelection.h b/include/llvm/CodeGen/InstrSelection.h index 89e827d106..2f269ea2d5 100644 --- a/include/llvm/CodeGen/InstrSelection.h +++ b/include/llvm/CodeGen/InstrSelection.h @@ -16,6 +16,8 @@ #include "llvm/Instruction.h" +namespace llvm { + class Function; class InstrForest; class MachineInstr; @@ -102,4 +104,6 @@ public: } }; +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/InstrSelectionSupport.h b/include/llvm/CodeGen/InstrSelectionSupport.h index 2ab23c756c..c1fba48615 100644 --- a/include/llvm/CodeGen/InstrSelectionSupport.h +++ b/include/llvm/CodeGen/InstrSelectionSupport.h @@ -17,6 +17,9 @@ #include "llvm/CodeGen/MachineInstr.h" #include "Support/DataTypes.h" + +namespace llvm { + class InstructionNode; class TargetMachine; class Instruction; @@ -44,4 +47,6 @@ MachineOperand::MachineOperandType ChooseRegOrImmed(int64_t intValue, unsigned& getMachineRegNum, int64_t& getImmedValue); +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h index 8d1306e061..3a0d044c59 100644 --- a/include/llvm/CodeGen/LiveVariables.h +++ b/include/llvm/CodeGen/LiveVariables.h @@ -32,6 +32,8 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include <map> +namespace llvm { + class MRegisterInfo; class LiveVariables : public MachineFunctionPass { @@ -207,4 +209,6 @@ public: void HandlePhysRegDef(unsigned Reg, MachineInstr *MI); }; +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h index b3959e81a7..b8a0361f7f 100644 --- a/include/llvm/CodeGen/MachineBasicBlock.h +++ b/include/llvm/CodeGen/MachineBasicBlock.h @@ -15,6 +15,9 @@ #define LLVM_CODEGEN_MACHINEBASICBLOCK_H #include <vector> + +namespace llvm { + class BasicBlock; class MachineInstr; template <typename T> struct ilist_traits; @@ -81,5 +84,6 @@ private: // Methods used to maintain doubly linked list of blocks... void setNext(MachineBasicBlock *N) { Next = N; } }; +} // End llvm namespace #endif diff --git a/include/llvm/CodeGen/MachineCodeEmitter.h b/include/llvm/CodeGen/MachineCodeEmitter.h index 4145851006..2d01f45d70 100644 --- a/include/llvm/CodeGen/MachineCodeEmitter.h +++ b/include/llvm/CodeGen/MachineCodeEmitter.h @@ -19,6 +19,9 @@ #include <string> #include "Support/DataTypes.h" + +namespace llvm { + class MachineFunction; class MachineBasicBlock; class MachineConstantPool; @@ -105,4 +108,6 @@ struct MachineCodeEmitter { static MachineCodeEmitter *createFilePrinterEmitter(MachineCodeEmitter&); }; +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/MachineCodeForInstruction.h b/include/llvm/CodeGen/MachineCodeForInstruction.h index d421f3e971..9a08de79af 100644 --- a/include/llvm/CodeGen/MachineCodeForInstruction.h +++ b/include/llvm/CodeGen/MachineCodeForInstruction.h @@ -28,6 +28,8 @@ #include "Support/Annotation.h" #include <vector> +namespace llvm { + class MachineInstr; class Instruction; class Value; @@ -96,4 +98,6 @@ public: CallArgsDescriptor* getCallArgsDescriptor() const { return callArgsDesc; } }; +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/MachineConstantPool.h b/include/llvm/CodeGen/MachineConstantPool.h index 441a43a9b9..edfd601faa 100644 --- a/include/llvm/CodeGen/MachineConstantPool.h +++ b/include/llvm/CodeGen/MachineConstantPool.h @@ -23,6 +23,9 @@ #define LLVM_CODEGEN_MACHINECONSTANTPOOL_H #include <vector> + +namespace llvm { + class Constant; class MachineConstantPool { @@ -54,4 +57,6 @@ public: void dump() const; }; +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/MachineFrameInfo.h b/include/llvm/CodeGen/MachineFrameInfo.h index 48b91012e0..e48158e1b5 100644 --- a/include/llvm/CodeGen/MachineFrameInfo.h +++ b/include/llvm/CodeGen/MachineFrameInfo.h @@ -38,12 +38,19 @@ #ifndef LLVM_CODEGEN_MACHINEFRAMEINFO_H #define LLVM_CODEGEN_MACHINEFRAMEINFO_H +namespace llvm { + class TargetData; class TargetRegisterClass; class Type; class MachineFunction; + +} + #include <vector> +namespace llvm { + class MachineFrameInfo { // StackObject - Represent a single object allocated on the stack. @@ -220,4 +227,6 @@ public: void dump(const MachineFunction &MF) const; }; +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index 7474a6e29a..60478cfe5a 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -22,6 +22,8 @@ #include "Support/Annotation.h" #include "Support/ilist" +namespace llvm { + class Function; class TargetMachine; class FunctionPass; @@ -141,4 +143,6 @@ public: MachineBasicBlock & back() { return BasicBlocks.back(); } }; +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/MachineFunctionInfo.h b/include/llvm/CodeGen/MachineFunctionInfo.h index db73322278..fdf135b16b 100644 --- a/include/llvm/CodeGen/MachineFunctionInfo.h +++ b/include/llvm/CodeGen/MachineFunctionInfo.h @@ -17,6 +17,9 @@ #include "Support/HashExtras.h" #include "Support/hash_set" + +namespace llvm { + class MachineFunction; class Value; class Constant; @@ -112,4 +115,6 @@ private: int allocateOptionalArg(const Type* type); }; +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/MachineFunctionPass.h b/include/llvm/CodeGen/MachineFunctionPass.h index 6975b5e785..390dcb8562 100644 --- a/include/llvm/CodeGen/MachineFunctionPass.h +++ b/include/llvm/CodeGen/MachineFunctionPass.h @@ -22,6 +22,8 @@ #include "llvm/Pass.h" #include "llvm/CodeGen/MachineFunction.h" +namespace llvm { + struct MachineFunctionPass : public FunctionPass { /// runOnMachineFunction - This method must be overloaded to perform the @@ -37,4 +39,6 @@ struct MachineFunctionPass : public FunctionPass { } }; +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index fc886d97f5..2eb373f462 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -20,6 +20,8 @@ #include "Support/Annotation.h" #include "Support/iterator" +namespace llvm { + class Value; class Function; class MachineBasicBlock; @@ -715,4 +717,6 @@ std::ostream& operator<<(std::ostream &OS, const MachineInstr &MI); std::ostream& operator<<(std::ostream &OS, const MachineOperand &MO); void PrintMachineInstructions(const Function *F); +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/MachineInstrAnnot.h b/include/llvm/CodeGen/MachineInstrAnnot.h index 98dde590b8..19d93ab56a 100644 --- a/include/llvm/CodeGen/MachineInstrAnnot.h +++ b/include/llvm/CodeGen/MachineInstrAnnot.h @@ -17,6 +17,8 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Target/TargetRegInfo.h" +namespace llvm { + class Value; class TmpInstruction; class CallInst; @@ -88,5 +90,6 @@ public: static CallArgsDescriptor *get(const MachineInstr* MI); }; +} // End llvm namespace #endif diff --git a/include/llvm/CodeGen/MachineInstrBuilder.h b/include/llvm/CodeGen/MachineInstrBuilder.h index 14c7fe041f..67255214a2 100644 --- a/include/llvm/CodeGen/MachineInstrBuilder.h +++ b/include/llvm/CodeGen/MachineInstrBuilder.h @@ -25,6 +25,8 @@ #include "llvm/CodeGen/MachineInstr.h" +namespace llvm { + class MachineInstrBuilder { MachineInstr *MI; public: @@ -162,4 +164,6 @@ inline MachineInstrBuilder BuildMI(MachineBasicBlock *BB, int Opcode, MOTy::Def); } +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h index 807257e2c5..11fcf29013 100644 --- a/include/llvm/CodeGen/Passes.h +++ b/include/llvm/CodeGen/Passes.h @@ -15,6 +15,8 @@ #ifndef LLVM_CODEGEN_PASSES_H #define LLVM_CODEGEN_PASSES_H +namespace llvm { + class FunctionPass; class PassInfo; class TargetMachine; @@ -52,4 +54,6 @@ FunctionPass *createPrologEpilogCodeInserter(); /// for the Sparc. FunctionPass *getRegisterAllocator(TargetMachine &T); +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/SSARegMap.h b/include/llvm/CodeGen/SSARegMap.h index 7f5d5f97e5..c31911c91b 100644 --- a/include/llvm/CodeGen/SSARegMap.h +++ b/include/llvm/CodeGen/SSARegMap.h @@ -19,6 +19,8 @@ #include "llvm/Target/MRegisterInfo.h" +namespace llvm { + class TargetRegisterClass; class SSARegMap { @@ -44,4 +46,6 @@ class SSARegMap { } }; +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/SchedGraphCommon.h b/include/llvm/CodeGen/SchedGraphCommon.h index 874e53d994..a422d9ae0d 100644 --- a/include/llvm/CodeGen/SchedGraphCommon.h +++ b/include/llvm/CodeGen/SchedGraphCommon.h @@ -18,6 +18,8 @@ #include "llvm/Value.h" #include <vector> +namespace llvm { + class SchedGraphEdge; class SchedGraphNode; @@ -217,4 +219,6 @@ public: ~SchedGraphCommon(); }; +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index f132f7b0a2..4719bf9d21 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -27,6 +27,9 @@ #include <map> #include <vector> #include <cassert> + +namespace llvm { + class Value; class Type; class Instruction; @@ -362,4 +365,6 @@ typedef ReducedValue<uint64_t , ISD::Constant_i64_Slot> ReducedValue_Consta typedef ReducedValue<float , ISD::Constant_f32_Slot> ReducedValue_Constant_f32; typedef ReducedValue<double , ISD::Constant_f64_Slot> ReducedValue_Constant_f64; +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/ValueSet.h b/include/llvm/CodeGen/ValueSet.h index 149506550d..f4bc6e80d4 100644 --- a/include/llvm/CodeGen/ValueSet.h +++ b/include/llvm/CodeGen/ValueSet.h @@ -17,6 +17,9 @@ #define VALUE_SET_H #include <set> + +namespace llvm { + class Value; // RAV - Used to print values in a form used by the register allocator. @@ -31,4 +34,6 @@ std::ostream &operator<<(std::ostream &out, RAV Val); typedef std::set<const Value*> ValueSet; void printSet(const ValueSet &S); +} // End llvm namespace + #endif diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h index dc85ee0d3c..b523b71a14 100644 --- a/include/llvm/CodeGen/ValueTypes.h +++ b/include/llvm/CodeGen/ValueTypes.h @@ -16,6 +16,8 @@ #ifndef LLVM_CODEGEN_VALUETYPES_H #define LLVM_CODEGEN_VALUETYPES_H +namespace llvm { + /// MVT namespace - This namespace defines the ValueType enum, which contains /// the various low-level value types. /// @@ -40,5 +42,6 @@ namespace MVT { // MVT = Machine Value Types }; }; -#endif +} // End llvm namespace +#endif |