Put all LLVM code into the llvm namespace, as per bug 109.

llvm-svn: 9903
This commit is contained in:
Brian Gaeke 2003-11-11 22:41:34 +00:00
parent da3f675edd
commit 960707c335
453 changed files with 2052 additions and 227 deletions

View File

@ -16,6 +16,7 @@ dnl **************************************************************************
dnl * Initialize
dnl **************************************************************************
AC_INIT([[[LLVM]]],[[[1.0]]],[llvmbugs@cs.uiuc.edu])
dnl AC_CONFIG_SRC_DIR(lib/VMCore/Pass.cpp)
dnl Place all of the extra autoconf files into the config subdirectory
AC_CONFIG_AUX_DIR([autoconf])

View File

@ -25,6 +25,8 @@
#include <string>
#include <cassert>
namespace llvm {
class AnnotationID;
class Annotation;
class Annotable;
@ -217,4 +219,6 @@ inline Annotation *Annotable::getOrCreateAnnotation(AnnotationID ID) const {
return A;
}
} // End namespace llvm
#endif

View File

@ -30,6 +30,8 @@
#include <functional>
#include <iostream>
namespace llvm {
class BitSetVector {
enum { BITSET_WORDSIZE = sizeof(long)*8 };
@ -266,4 +268,5 @@ inline bool Disjoint(const BitSetVector& set1,
return true;
}
} // End llvm namespace
#endif

View File

@ -15,6 +15,8 @@
#ifndef SUPPORT_CASTING_H
#define SUPPORT_CASTING_H
namespace llvm {
//===----------------------------------------------------------------------===//
// isa<x> Support Templates
//===----------------------------------------------------------------------===//
@ -293,4 +295,6 @@ void main() {
#endif
} // End llvm namespace
#endif

View File

@ -27,6 +27,7 @@
#include <cassert>
#include "boost/type_traits/object_traits.hpp"
namespace llvm {
/// cl Namespace - This namespace contains all of the command line option
/// processing machinery. It is intentionally a short name to make qualified
/// usage concise.
@ -1022,4 +1023,6 @@ struct aliasopt {
} // End namespace cl
} // End namespace llvm
#endif

View File

@ -19,6 +19,8 @@
#include <string>
namespace llvm {
/// DefaultDOTGraphTraits - This class provides the default implementations of
/// all of the DOTGraphTraits methods. If a specialization does not need to
/// override all methods here it should inherit so that it can get the default
@ -96,4 +98,6 @@ struct DefaultDOTGraphTraits {
template <typename Ty>
class DOTGraphTraits : public DefaultDOTGraphTraits {};
} // End llvm namespace
#endif

View File

@ -26,6 +26,8 @@
#ifndef SUPPORT_DEBUG_H
#define SUPPORT_DEBUG_H
namespace llvm {
// DebugFlag - This boolean is set to true if the '-debug' command line option
// is specified. This should probably not be referenced directly, instead, use
// the DEBUG macro below.
@ -57,4 +59,6 @@ bool isCurrentDebugType(const char *Type);
do { if (DebugFlag && isCurrentDebugType(DEBUG_TYPE)) { X; } } while (0)
#endif
} // End llvm namespace
#endif

View File

@ -38,6 +38,8 @@
#include <vector>
#include <set>
namespace llvm {
// df_iterator_storage - A private class which is used to figure out where to
// store the visited set.
template<class SetType, bool External> // Non-external set
@ -223,5 +225,6 @@ idf_ext_iterator<T, SetTy> idf_ext_end(T G, SetTy &S) {
return idf_ext_iterator<T, SetTy>::end(G, S);
}
} // End llvm namespace
#endif

View File

@ -18,6 +18,8 @@
#include <string>
namespace llvm {
/// LinkDynamicObject - Load the named file as a dynamic library
/// and link it with the currently running process. Returns false
/// on success, true if there is an error (and sets ErrorMessage
@ -33,4 +35,6 @@ bool LinkDynamicObject (const char *filename, std::string *ErrorMessage);
void *GetAddressOfSymbol (const char *symbolName);
void *GetAddressOfSymbol (const std::string &symbolName);
} // End llvm namespace
#endif // SUPPORT_DYNAMICLINKER_H

View File

@ -20,6 +20,8 @@
#include <map>
#include <vector>
namespace llvm {
template <class ElemTy>
class EquivalenceClasses {
// Maps each element to the element that is the leader of its
@ -89,4 +91,6 @@ public:
}
};
} // End llvm namespace
#endif

View File

@ -17,6 +17,8 @@
#include <string>
namespace llvm {
/// CheckMagic - Returns true IFF the file named FN begins with Magic. FN must
/// name a readable file.
///
@ -95,4 +97,6 @@ bool MakeFileExecutable (const std::string & Filename);
///
bool MakeFileReadable (const std::string & Filename);
} // End llvm namespace
#endif

View File

@ -18,6 +18,8 @@
#ifndef SUPPORT_GRAPHTRAITS_H
#define SUPPORT_GRAPHTRAITS_H
namespace llvm {
// GraphTraits - This class should be specialized by different graph types...
// which is why the default version is empty.
//
@ -76,4 +78,6 @@ struct Inverse {
inline Inverse(GraphType &G) : Graph(G) {}
};
} // End llvm namespace
#endif

View File

@ -28,6 +28,8 @@
#include <vector>
#include <iostream>
namespace llvm {
namespace DOT { // Private functions...
inline std::string EscapeString(const std::string &Label) {
std::string Str(Label);
@ -206,4 +208,6 @@ std::ostream &WriteGraph(std::ostream &O, const GraphType &G,
return O;
}
} // End llvm namespace
#endif

View File

@ -23,6 +23,9 @@
#define SUPPORT_LEAKDETECTOR_H
#include <string>
namespace llvm {
class Value;
struct LeakDetector {
@ -83,4 +86,6 @@ private:
static void checkForGarbageImpl(const std::string &Message);
};
} // End llvm namespace
#endif

View File

@ -23,6 +23,8 @@
#include <cstdlib>
#include <memory>
namespace llvm {
template<typename T>
struct MallocAllocator {
typedef size_t size_type;
@ -79,5 +81,6 @@ namespace std {
};
}
} // End llvm namespace
#endif

View File

@ -16,6 +16,8 @@
#include "Support/DataTypes.h"
namespace llvm {
inline unsigned log2(uint64_t C) {
unsigned getPow;
for (getPow = 0; C > 1; ++getPow)
@ -33,4 +35,6 @@ inline bool isPowerOf2(int64_t C, unsigned &getPow) {
return false;
}
} // End llvm namespace
#endif

View File

@ -21,6 +21,8 @@
#include <stack>
#include <set>
namespace llvm {
template<class GraphT, class GT = GraphTraits<GraphT> >
class po_iterator : public forward_iterator<typename GT::NodeType, ptrdiff_t> {
typedef forward_iterator<typename GT::NodeType, ptrdiff_t> super;
@ -149,4 +151,6 @@ public:
inline rpo_iterator end() { return Blocks.rend(); }
};
} // End llvm namespace
#endif

View File

@ -26,6 +26,8 @@
#include <vector>
#include <map>
namespace llvm {
//===----------------------------------------------------------------------===//
///
/// scc_iterator - Enumerate the SCCs of a directed graph, in
@ -197,4 +199,6 @@ scc_iterator<T> scc_end(T G) {
return scc_iterator<T>::end(G);
}
} // End llvm namespace
#endif

View File

@ -21,6 +21,8 @@
#include "Support/iterator"
#include "boost/type_traits/transform_traits.hpp"
namespace llvm {
//===----------------------------------------------------------------------===//
// Extra additions to <functional>
//===----------------------------------------------------------------------===//
@ -278,4 +280,6 @@ inline tier<T1, T2> tie(T1& f, T2& s) {
return tier<T1, T2>(f, s);
}
} // End llvm namespace
#endif

View File

@ -15,6 +15,8 @@
#ifndef SUPPORT_SETOPERATIONS_H
#define SUPPORT_SETOPERATIONS_H
namespace llvm {
// set_union(A, B) - Compute A := A u B, return whether A changed.
//
template <class S1Ty, class S2Ty>
@ -64,4 +66,6 @@ void set_subtract(S1Ty &S1, const S2Ty &S2) {
S1.erase(*SI);
}
} // End llvm namespace
#endif

View File

@ -17,10 +17,13 @@
#include <string>
namespace llvm {
// RemoveFileOnSignal - This function registers signal handlers to ensure that
// if a signal gets delivered that the named file is removed.
//
void RemoveFileOnSignal(const std::string &Filename);
#endif
} // End llvm namespace
#endif

View File

@ -26,6 +26,8 @@
#include <iosfwd>
namespace llvm {
// StatisticBase - Nontemplated base class for Statistic<> class...
class StatisticBase {
const char *Name;
@ -78,4 +80,6 @@ public:
const Statistic &operator-=(const DataType &V) { Value -= V; return *this; }
};
} // End llvm namespace
#endif

View File

@ -18,6 +18,8 @@
#include <string>
#include <stdio.h>
namespace llvm {
static inline std::string utohexstr(uint64_t X) {
char Buffer[40];
char *BufPtr = Buffer+39;
@ -95,4 +97,6 @@ static inline std::string ftostr(double V) {
return Buffer;
}
} // End llvm namespace
#endif

View File

@ -17,6 +17,8 @@
#include <string>
namespace llvm {
/// isExecutableFile - This function returns true if the filename specified
/// exists and is executable.
///
@ -45,4 +47,7 @@ int RunProgramWithTimeout(const std::string &ProgramPath, const char **Args,
/// wait for it to terminate.
///
int ExecWait (const char * const argv[], const char * const envp[]);
} // End llvm namespace
#endif

View File

@ -20,6 +20,8 @@
#include <iosfwd>
#include <cassert>
namespace llvm {
class TimerGroup;
/// Timer - This class is used to track the amount of time spent between
@ -157,4 +159,6 @@ private:
}
};
} // End llvm namespace
#endif

View File

@ -17,6 +17,8 @@
#include <vector>
namespace llvm {
template<class ConcreteTreeNode, class Payload>
class Tree {
std::vector<ConcreteTreeNode*> Children; // This nodes children, if any
@ -55,5 +57,6 @@ public:
inline const Payload &getTreeData() const { return Data; }
};
} // End llvm namespace
#endif

View File

@ -18,6 +18,8 @@
#include <typeinfo>
namespace llvm {
struct TypeInfo {
TypeInfo() { // needed for containers
struct Nil {}; // Anonymous class distinct from all others...
@ -69,4 +71,6 @@ inline bool operator>=(const TypeInfo &lhs, const TypeInfo &rhs) {
return !(lhs < rhs);
}
} // End llvm namespace
#endif

View File

@ -17,6 +17,8 @@
#include <cstdarg>
namespace llvm {
/// make_vector - Helper function which is useful for building temporary vectors
/// to pass into type construction of CallInst ctors. This turns a null
/// terminated list of pointers (or other value types) into a real live vector.
@ -33,4 +35,6 @@ inline std::vector<T> make_vector(T A, ...) {
return Result;
}
} // End llvm namespace
#endif

View File

@ -41,6 +41,8 @@
#include <Support/iterator>
#include <cassert>
namespace llvm {
template<typename NodeTy, typename Traits> class iplist;
template<typename NodeTy> class ilist_iterator;
@ -522,10 +524,12 @@ struct ilist : public iplist<NodeTy> {
void resize(size_type newsize) { resize(newsize, NodeTy()); }
};
} // End llvm namespace
namespace std {
// Ensure that swap uses the fast list swap...
template<class Ty>
void swap(iplist<Ty> &Left, iplist<Ty> &Right) {
void swap(llvm::iplist<Ty> &Left, llvm::iplist<Ty> &Right) {
Left.swap(Right);
}
} // End 'std' extensions...

View File

@ -37,6 +37,8 @@
//
#include <cassert>
namespace llvm {
class Type;
class DerivedType;
@ -165,4 +167,6 @@ private:
void dropRef();
};
} // End llvm namespace
#endif

View File

@ -31,6 +31,9 @@
#define LLVM_ANALYSIS_ALIAS_ANALYSIS_H
#include "llvm/Support/CallSite.h"
namespace llvm {
class LoadInst;
class StoreInst;
class TargetData;
@ -156,4 +159,6 @@ public:
const Value *Ptr, unsigned Size);
};
} // End llvm namespace
#endif

View File

@ -21,6 +21,9 @@
#include "Support/iterator"
#include "Support/hash_map"
#include "Support/ilist"
namespace llvm {
class AliasAnalysis;
class LoadInst;
class StoreInst;
@ -283,4 +286,6 @@ inline std::ostream& operator<<(std::ostream &OS, const AliasSetTracker &AST) {
return OS;
}
} // End llvm namespace
#endif

View File

@ -51,6 +51,9 @@
#include "Support/GraphTraits.h"
#include "Support/STLExtras.h"
#include "llvm/Pass.h"
namespace llvm {
class Function;
class Module;
class CallGraphNode;
@ -288,4 +291,6 @@ template<> struct GraphTraits<const CallGraph*> :
static IncludeFile
CALLGRAPH_INCLUDE_FILE((void*)&CallGraph::stub);
} // End llvm namespace
#endif

View File

@ -19,6 +19,9 @@
#include "llvm/Support/InstIterator.h"
#include "llvm/Instruction.h"
#include "Support/iterator"
namespace llvm {
class Constant;
class constant_iterator : public forward_iterator<const Constant, ptrdiff_t> {
@ -86,4 +89,6 @@ inline constant_iterator constant_end(const Function *F) {
return constant_iterator(F, true);
}
} // End llvm namespace
#endif

View File

@ -15,6 +15,9 @@
#define LLVM_ANALYSIS_DSGRAPH_H
#include "llvm/Analysis/DSNode.h"
namespace llvm {
class GlobalValue;
//===----------------------------------------------------------------------===//
@ -332,4 +335,6 @@ public:
void removeTriviallyDeadNodes();
};
} // End llvm namespace
#endif

View File

@ -21,6 +21,8 @@
#include "Support/iterator"
#include "Support/STLExtras.h"
namespace llvm {
template<typename NodeTy>
class DSNodeIterator : public forward_iterator<const DSNode, ptrdiff_t> {
friend class DSNode;
@ -146,4 +148,6 @@ template <> struct GraphTraits<const DSGraph*> {
static ChildIteratorType child_end(const NodeType *N) { return N->end(); }
};
} // End llvm namespace
#endif

View File

@ -16,6 +16,8 @@
#include "llvm/Analysis/DSSupport.h"
namespace llvm {
template<typename BaseType>
class DSNodeIterator; // Data structure graph traversal iterator
class TargetData;
@ -382,4 +384,6 @@ inline void DSNodeHandle::mergeWith(const DSNodeHandle &Node) {
*this = Node;
}
} // End llvm namespace
#endif

View File

@ -18,6 +18,8 @@
#include "Support/hash_set"
#include "llvm/Support/CallSite.h"
namespace llvm {
class Function;
class CallInst;
class Value;
@ -122,10 +124,14 @@ private:
DSNode *HandleForwarding() const;
};
} // End llvm namespace
namespace std {
inline void swap(DSNodeHandle &NH1, DSNodeHandle &NH2) { NH1.swap(NH2); }
inline void swap(llvm::DSNodeHandle &NH1, llvm::DSNodeHandle &NH2) { NH1.swap(NH2); }
}
namespace llvm {
//===----------------------------------------------------------------------===//
/// DSCallSite - Representation of a call site via its call instruction,
/// the DSNode handle for the callee function (or function pointer), and
@ -287,7 +293,9 @@ public:
}
};
} // End llvm namespace
namespace std {
inline void swap(DSCallSite &CS1, DSCallSite &CS2) { CS1.swap(CS2); }
inline void swap(llvm::DSCallSite &CS1, llvm::DSCallSite &CS2) { CS1.swap(CS2); }
}
#endif

View File

@ -18,6 +18,8 @@
#include "llvm/Target/TargetData.h"
#include "Support/hash_set"
namespace llvm {
class Type;
class Instruction;
class DSGraph;
@ -184,4 +186,6 @@ private:
const BUDataStructures::ActualCalleesTy &ActualCallees);
};
} // End llvm namespace
#endif

View File

@ -30,6 +30,8 @@
#include <utility>
#include <cassert>
namespace llvm {
class Instruction;
class Function;
class Dependence;
@ -264,4 +266,6 @@ public:
//===----------------------------------------------------------------------===//
} // End llvm namespace
#endif

View File

@ -28,6 +28,8 @@
#include "llvm/Pass.h"
#include <set>
namespace llvm {
class Instruction;
template <typename GraphType> struct GraphTraits;
@ -487,4 +489,6 @@ private:
const DominatorTree::Node *Node);
};
} // End llvm namespace
#endif

View File

@ -17,6 +17,8 @@
#ifndef LLVM_ANALYSIS_EXPRESSIONS_H
#define LLVM_ANALYSIS_EXPRESSIONS_H
namespace llvm {
class Type;
class Value;
class ConstantInt;
@ -56,4 +58,6 @@ struct ExprType {
const Type *getExprType(const Type *Default) const;
};
} // End llvm namespace
#endif

View File

@ -27,6 +27,8 @@
#include "llvm/Pass.h"
#include <set>
namespace llvm {
class PointerType;
struct FindUnsafePointerTypes : public Pass {
@ -55,4 +57,6 @@ public:
}
};
} // End llvm namespace
#endif

View File

@ -16,6 +16,9 @@
#include "llvm/Pass.h"
#include <set>
namespace llvm {
class Type;
class FindUsedTypes : public Pass {
@ -59,4 +62,6 @@ public:
static IncludeFile
FIND_USED_TYPES_INCLUDE_FILE((void*)&FindUsedTypes::stub);
} // End llvm namespace
#endif

View File

@ -50,6 +50,8 @@
#include "Support/BitSetVector.h"
#include "Support/hash_map"
namespace llvm {
class Module;
class Function;
class CallSite;
@ -239,4 +241,6 @@ public:
//===----------------------------------------------------------------------===//
} // End llvm namespace
#endif

View File

@ -27,6 +27,9 @@
#define LLVM_ANALYSIS_INDUCTIONVARIABLE_H
#include <iosfwd>
namespace llvm {
class Value;
class PHINode;
class Instruction;
@ -60,4 +63,6 @@ public:
void print(std::ostream &OS) const;
};
} // End llvm namespace
#endif

View File

@ -25,6 +25,8 @@
#include "Support/Tree.h"
#include <map>
namespace llvm {
template<class Payload> class InstTreeNode;
template<class Payload> class InstForest;
@ -288,5 +290,7 @@ InstTreeNode<Payload>::InstTreeNode(InstForest<Payload> &IF, Value *V,
getTreeData().first.second = InstructionNode;
}
} // End llvm namespace
#endif

View File

@ -24,6 +24,8 @@
#include <vector>
#include <iosfwd>
namespace llvm {
class BasicBlock;
//===----------------------------------------------------------------------===//
@ -146,4 +148,6 @@ template <> struct GraphTraits<Inverse<Interval*> > {
}
};
} // End llvm namespace
#endif

View File

@ -40,6 +40,8 @@
#include <set>
#include <algorithm>
namespace llvm {
// getNodeHeader - Given a source graph node and the source graph, return the
// BasicBlock that is the header node. This is the opposite of
// getSourceGraphNode.
@ -253,4 +255,6 @@ inline interval_part_interval_iterator intervals_end(IntervalPartition &IP) {
return interval_part_interval_iterator();
}
} // End llvm namespace
#endif

View File

@ -26,6 +26,8 @@
#include "llvm/Analysis/Interval.h"
#include "llvm/Pass.h"
namespace llvm {
//===----------------------------------------------------------------------===//
//
// IntervalPartition - This class builds and holds an "interval partition" for
@ -102,4 +104,6 @@ private:
void updatePredecessors(Interval *Int);
};
} // End llvm namespace
#endif

View File

@ -21,6 +21,8 @@
#ifndef LLVM_ANALYSIS_LOAD_VALUE_NUMBERING_H
#define LLVM_ANALYSIS_LOAD_VALUE_NUMBERING_H
namespace llvm {
class Pass;
/// createLoadValueNumberingPass - Create and return a new pass that implements
@ -28,4 +30,6 @@ class Pass;
///
Pass *createLoadValueNumberingPass();
} // End llvm namespace
#endif

View File

@ -29,6 +29,8 @@
#include "Support/GraphTraits.h"
#include <set>
namespace llvm {
class DominatorSet;
class LoopInfo;
@ -224,4 +226,6 @@ template <> struct GraphTraits<Loop*> {
}
};
} // End llvm namespace
#endif

View File

@ -24,6 +24,8 @@
#include "llvm/Pass.h"
#include "Support/hash_map"
namespace llvm {
class ModRefTable;
class DSGraph;
class FunctionModRefInfo;
@ -96,4 +98,6 @@ public:
void dump() const;
};
} // End llvm namespace
#endif

View File

@ -46,6 +46,8 @@
#include "llvm/Pass.h"
#include "Support/iterator"
namespace llvm {
class DSGraph;
class DependenceGraph;
class PgmDependenceGraph;
@ -304,7 +306,8 @@ public:
void dump() const;
};
//===----------------------------------------------------------------------===//
} // End llvm namespace
#endif

View File

@ -16,6 +16,8 @@
#include "llvm/Analysis/Dominators.h"
namespace llvm {
/// PostDominatorSet Class - Concrete subclass of DominatorSetBase that is used
/// to compute the post-dominator set. Because there can be multiple exit nodes
@ -117,4 +119,6 @@ private:
static IncludeFile
POST_DOMINATOR_INCLUDE_FILE((void*)&PostDominanceFrontier::stub);
} // End llvm namespace
#endif

View File

@ -21,6 +21,9 @@
#define LLVM_ANALYSIS_VALUE_NUMBERING_H
#include <vector>
namespace llvm {
class Value;
struct ValueNumbering {
@ -34,4 +37,6 @@ struct ValueNumbering {
virtual ~ValueNumbering(); // We want to be subclassed
};
} // End llvm namespace
#endif

View File

@ -21,6 +21,8 @@
#ifndef LLVM_ANALYSIS_VERIFIER_H
#define LLVM_ANALYSIS_VERIFIER_H
namespace llvm {
class FunctionPass;
class Module;
class Function;
@ -40,4 +42,6 @@ bool verifyModule(const Module &M);
// pass.
bool verifyFunction(const Function &F);
} // End llvm namespace
#endif

View File

@ -17,6 +17,8 @@
#include "llvm/Value.h"
namespace llvm {
class Argument : public Value { // Defined in the Function.cpp file
Function *Parent;
@ -56,4 +58,6 @@ public:
}
};
} // End llvm namespace
#endif

View File

@ -18,6 +18,9 @@
#define LLVM_ASSEMBLY_ASMANNOTATIONWRITER_H
#include <iosfwd>
namespace llvm {
class Function;
class BasicBlock;
class Instruction;
@ -37,4 +40,6 @@ struct AssemblyAnnotationWriter {
virtual void emitInstructionAnnot(const Instruction *I, std::ostream &OS) {}
};
} // End llvm namespace
#endif

View File

@ -16,7 +16,12 @@
#define LLVM_ASSEMBLY_CWRITER_H
#include <iosfwd>
namespace llvm {
class Pass;
Pass *createWriteToCPass(std::ostream &o);
} // End llvm namespace
#endif

View File

@ -20,6 +20,8 @@
#include "llvm/Value.h"
#include <iostream>
namespace llvm {
class Module;
class PointerType;
class SlotCalculator;
@ -82,4 +84,6 @@ public:
}
};
} // End llvm namespace
#endif

View File

@ -16,6 +16,8 @@
#include <string>
namespace llvm {
class Module;
class ParseException;
@ -70,4 +72,6 @@ private :
ParseException &operator=(const ParseException &E); // objects by reference
};
} // End llvm namespace
#endif

View File

@ -21,6 +21,8 @@
#include "llvm/Pass.h"
#include "llvm/Module.h"
namespace llvm {
class PrintModulePass : public Pass {
std::ostream *Out; // ostream to print on
bool DeleteStream; // Delete the ostream in our dtor?
@ -72,4 +74,6 @@ public:
}
};
} // End llvm namespace
#endif

View File

@ -24,6 +24,9 @@
#define LLVM_ASSEMBLY_WRITER_H
#include <iosfwd>
namespace llvm {
class Type;
class Module;
class Value;
@ -43,4 +46,6 @@ std::ostream &WriteTypeSymbolic(std::ostream &, const Type *, const Module *M);
std::ostream &WriteAsOperand(std::ostream &, const Value *, bool PrintTy = true,
bool PrintName = true, const Module *Context = 0);
} // End llvm namespace
#endif

View File

@ -33,6 +33,8 @@
#include "llvm/SymbolTableListTraits.h"
#include "Support/ilist"
namespace llvm {
class TerminatorInst;
template <class _Term, class _BB> class SuccIterator; // Successor Iterator
template <class _Ptr, class _USE_iterator> class PredIterator;
@ -171,4 +173,6 @@ public:
BasicBlock *splitBasicBlock(iterator I, const std::string &BBName = "");
};
} // End llvm namespace
#endif

View File

@ -15,6 +15,8 @@
#ifndef LLVM_BYTECODE_FORMAT_H
#define LLVM_BYTECODE_FORMAT_H
namespace llvm {
class BytecodeFormat { // Throw the constants into a poorman's namespace...
BytecodeFormat(); // do not implement
public:
@ -38,4 +40,7 @@ public:
BasicBlock = 0x31, // May contain many basic blocks
};
};
} // End llvm namespace
#endif

View File

@ -23,6 +23,8 @@
#include <string>
#include <deque>
namespace llvm {
//===----------------------------------------------------------------------===//
// Reading Primitives
//===----------------------------------------------------------------------===//
@ -275,4 +277,6 @@ static inline void output_data(void *Ptr, void *End,
if (Align) align32(Out);
}
} // End llvm namespace
#endif

View File

@ -23,6 +23,8 @@
#include <string>
#include <vector>
namespace llvm {
/// getBytecodeModuleProvider - lazy function-at-a-time loading from a file
///
ModuleProvider *getBytecodeModuleProvider(const std::string &Filename);
@ -53,4 +55,6 @@ bool ReadArchiveFile(const std::string &Filename,
std::vector<Module*> &Objects,
std::string *ErrorStr = 0);
} // End llvm namespace
#endif

View File

@ -19,6 +19,8 @@
#include "llvm/Bytecode/Writer.h"
#include <iostream>
namespace llvm {
class WriteBytecodePass : public Pass {
std::ostream *Out; // ostream to print on
bool DeleteStream;
@ -38,4 +40,6 @@ public:
}
};
} // End llvm namespace
#endif

View File

@ -26,7 +26,11 @@
#include <iosfwd>
namespace llvm {
class Module;
void WriteBytecodeToFile(const Module *C, std::ostream &Out);
} // End llvm namespace
#endif

View File

@ -23,6 +23,8 @@
#include "llvm/Pass.h"
namespace llvm {
class CallGraphNode;
struct CallGraphSCCPass : public Pass {
@ -46,4 +48,6 @@ struct CallGraphSCCPass : public Pass {
virtual void getAnalysisUsage(AnalysisUsage &Info) const;
};
} // End llvm namespace
#endif

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -16,6 +16,8 @@
#include "llvm/User.h"
namespace llvm {
class Constant : public User {
protected:
inline Constant(const Type *Ty) : User(Ty, Value::ConstantVal) {}
@ -91,4 +93,6 @@ public:
// END WARNING!!
};
} // End llvm namespace
#endif

View File

@ -42,6 +42,9 @@
#include "llvm/Constants.h"
#include "llvm/Type.h"
namespace llvm {
class PointerType;
//===----------------------------------------------------------------------===//
@ -244,4 +247,7 @@ Constant *ConstantFoldShiftInstruction(unsigned Opcode, const Constant *V1,
const Constant *V2);
Constant *ConstantFoldGetElementPtr(const Constant *C,
const std::vector<Constant*> &IdxList);
} // End llvm namespace
#endif

View File

@ -18,6 +18,8 @@
#include "llvm/Constant.h"
#include "Support/DataTypes.h"
namespace llvm {
class ArrayType;
class StructType;
class PointerType;
@ -575,4 +577,6 @@ public:
}
};
} // End llvm namespace
#endif

View File

@ -21,6 +21,8 @@
#include "llvm/Type.h"
#include <vector>
namespace llvm {
template<class ValType, class TypeClass> class TypeMap;
class FunctionValType;
class ArrayValType;
@ -490,4 +492,6 @@ inline const Type* PATypeHolder::get() const {
return *const_cast<PATypeHolder*>(this) = NewTy;
}
} // End llvm namespace
#endif

View File

@ -19,6 +19,9 @@
#include <string>
#include <map>
#include <cassert>
namespace llvm {
class Constant;
class Function;
union GenericValue;
@ -92,4 +95,6 @@ protected:
GenericValue LoadValueFromMemory(GenericValue *Ptr, const Type *Ty);
};
} // End llvm namespace
#endif

View File

@ -17,6 +17,8 @@
#include "Support/DataTypes.h"
namespace llvm {
typedef uint64_t PointerTy;
union GenericValue {
@ -44,4 +46,6 @@ inline GenericValue PTOGV(void *P) { return GenericValue(P); }
inline void* GVTOP(const GenericValue &GV) {
return (void*)(intptr_t)GV.PointerVal;
}
} // End llvm namespace
#endif

Some files were not shown because too many files have changed in this diff Show More