diff options
41 files changed, 382 insertions, 382 deletions
diff --git a/include/llvm/Support/AIXDataTypesFix.h b/include/llvm/Support/AIXDataTypesFix.h index 3a7e7f0d4b..256e45fec4 100644 --- a/include/llvm/Support/AIXDataTypesFix.h +++ b/include/llvm/Support/AIXDataTypesFix.h @@ -1,10 +1,10 @@ //===-- llvm/Support/AIXDataTypesFix.h - Fix datatype defs ------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file overrides default system-defined types and limits which cannot be diff --git a/include/llvm/Support/Annotation.h b/include/llvm/Support/Annotation.h index 2331ca5a23..1b0d048fb6 100644 --- a/include/llvm/Support/Annotation.h +++ b/include/llvm/Support/Annotation.h @@ -1,10 +1,10 @@ //===-- llvm/Support/Annotation.h - Annotation classes ----------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file contains the declarations for two classes: Annotation & Annotable. @@ -81,7 +81,7 @@ public: //===----------------------------------------------------------------------===// // // Annotable - This class is used as a base class for all objects that would -// like to have annotation capability. One notable subclass is Value, which +// like to have annotation capability. One notable subclass is Value, which // means annotations can be attached to almost everything in LLVM. // // Annotable objects keep their annotation list sorted as annotations are @@ -157,13 +157,13 @@ public: // one-to-one mapping between string Annotation names and Annotation ID numbers. // // Compared to the rest of the Annotation system, these mapping methods are -// relatively slow, so they should be avoided by locally caching Annotation +// relatively slow, so they should be avoided by locally caching Annotation // ID #'s. These methods are safe to call at any time, even by static ctors, so // they should be used by static ctors most of the time. // // This class also provides support for annotations that are created on demand // by the Annotable::getOrCreateAnnotation method. To get this to work, simply -// register an annotation handler +// register an annotation handler // struct AnnotationManager { typedef Annotation *(*Factory)(AnnotationID, const Annotable *, void*); @@ -183,7 +183,7 @@ struct AnnotationManager { // Annotation creation on demand support... // registerAnnotationFactory - This method is used to register a callback - // function used to create an annotation on demand if it is needed by the + // function used to create an annotation on demand if it is needed by the // Annotable::getOrCreateAnnotation method. // static void registerAnnotationFactory(AnnotationID ID, Factory Func, diff --git a/include/llvm/Support/CFG.h b/include/llvm/Support/CFG.h index 231531a7ae..4efefa7253 100644 --- a/include/llvm/Support/CFG.h +++ b/include/llvm/Support/CFG.h @@ -1,10 +1,10 @@ //===-- llvm/Support/CFG.h - Process LLVM structures as graphs --*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines specializations of GraphTraits that allow Function and @@ -34,40 +34,40 @@ class PredIterator : public forward_iterator<_Ptr, ptrdiff_t> { public: typedef PredIterator<_Ptr,_USE_iterator> _Self; typedef typename super::pointer pointer; - + inline void advancePastNonTerminators() { // Loop to ignore non terminator uses (for example PHI nodes)... while (It != BB->use_end() && !isa<TerminatorInst>(*It)) ++It; } - + inline PredIterator(_Ptr *bb) : BB(bb), It(bb->use_begin()) { advancePastNonTerminators(); } inline PredIterator(_Ptr *bb, bool) : BB(bb), It(bb->use_end()) {} - + inline bool operator==(const _Self& x) const { return It == x.It; } inline bool operator!=(const _Self& x) const { return !operator==(x); } - - inline pointer operator*() const { + + inline pointer operator*() const { assert(It != BB->use_end() && "pred_iterator out of range!"); - return cast<TerminatorInst>(*It)->getParent(); + return cast<TerminatorInst>(*It)->getParent(); } inline pointer *operator->() const { return &(operator*()); } - + inline _Self& operator++() { // Preincrement assert(It != BB->use_end() && "pred_iterator out of range!"); ++It; advancePastNonTerminators(); - return *this; + return *this; } - + inline _Self operator++(int) { // Postincrement - _Self tmp = *this; ++*this; return tmp; + _Self tmp = *this; ++*this; return tmp; } }; typedef PredIterator<BasicBlock, Value::use_iterator> pred_iterator; -typedef PredIterator<const BasicBlock, +typedef PredIterator<const BasicBlock, Value::use_const_iterator> pred_const_iterator; inline pred_iterator pred_begin(BasicBlock *BB) { return pred_iterator(BB); } @@ -94,7 +94,7 @@ public: typedef SuccIterator<Term_, BB_> _Self; typedef typename super::pointer pointer; // TODO: This can be random access iterator, need operator+ and stuff tho - + inline SuccIterator(Term_ T) : Term(T), idx(0) { // begin iterator assert(T && "getTerminator returned null!"); } @@ -112,18 +112,18 @@ public: /// getSuccessorIndex - This is used to interface between code that wants to /// operate on terminator instructions directly. unsigned getSuccessorIndex() const { return idx; } - + inline bool operator==(const _Self& x) const { return idx == x.idx; } inline bool operator!=(const _Self& x) const { return !operator==(x); } - + inline pointer operator*() const { return Term->getSuccessor(idx); } inline pointer operator->() const { return operator*(); } - + inline _Self& operator++() { ++idx; return *this; } // Preincrement inline _Self operator++(int) { // Postincrement - _Self tmp = *this; ++*this; return tmp; + _Self tmp = *this; ++*this; return tmp; } - + inline _Self& operator--() { --idx; return *this; } // Predecrement inline _Self operator--(int) { // Postdecrement _Self tmp = *this; --*this; return tmp; @@ -153,7 +153,7 @@ inline succ_const_iterator succ_end(const BasicBlock *BB) { // GraphTraits specializations for basic block graphs (CFGs) //===--------------------------------------------------------------------===// -// Provide specializations of GraphTraits to be able to treat a function as a +// Provide specializations of GraphTraits to be able to treat a function as a // graph of basic blocks... template <> struct GraphTraits<BasicBlock*> { @@ -161,10 +161,10 @@ template <> struct GraphTraits<BasicBlock*> { typedef succ_iterator ChildIteratorType; static NodeType *getEntryNode(BasicBlock *BB) { return BB; } - static inline ChildIteratorType child_begin(NodeType *N) { + static inline ChildIteratorType child_begin(NodeType *N) { return succ_begin(N); } - static inline ChildIteratorType child_end(NodeType *N) { + static inline ChildIteratorType child_end(NodeType *N) { return succ_end(N); } }; @@ -175,15 +175,15 @@ template <> struct GraphTraits<const BasicBlock*> { static NodeType *getEntryNode(const BasicBlock *BB) { return BB; } - static inline ChildIteratorType child_begin(NodeType *N) { + static inline ChildIteratorType child_begin(NodeType *N) { return succ_begin(N); } - static inline ChildIteratorType child_end(NodeType *N) { + static inline ChildIteratorType child_end(NodeType *N) { return succ_end(N); } }; -// Provide specializations of GraphTraits to be able to treat a function as a +// Provide specializations of GraphTraits to be able to treat a function as a // graph of basic blocks... and to walk it in inverse order. Inverse order for // a function is considered to be when traversing the predecessor edges of a BB // instead of the successor edges. @@ -192,10 +192,10 @@ template <> struct GraphTraits<Inverse<BasicBlock*> > { typedef BasicBlock NodeType; typedef pred_iterator ChildIteratorType; static NodeType *getEntryNode(Inverse<BasicBlock *> G) { return G.Graph; } - static inline ChildIteratorType child_begin(NodeType *N) { + static inline ChildIteratorType child_begin(NodeType *N) { return pred_begin(N); } - static inline ChildIteratorType child_end(NodeType *N) { + static inline ChildIteratorType child_end(NodeType *N) { return pred_end(N); } }; @@ -204,12 +204,12 @@ template <> struct GraphTraits<Inverse<const BasicBlock*> > { typedef const BasicBlock NodeType; typedef pred_const_iterator ChildIteratorType; static NodeType *getEntryNode(Inverse<const BasicBlock*> G) { - return G.Graph; + return G.Graph; } - static inline ChildIteratorType child_begin(NodeType *N) { + static inline ChildIteratorType child_begin(NodeType *N) { return pred_begin(N); } - static inline ChildIteratorType child_end(NodeType *N) { + static inline ChildIteratorType child_end(NodeType *N) { return pred_end(N); } }; @@ -220,7 +220,7 @@ template <> struct GraphTraits<Inverse<const BasicBlock*> > { // GraphTraits specializations for function basic block graphs (CFGs) //===--------------------------------------------------------------------===// -// Provide specializations of GraphTraits to be able to treat a function as a +// Provide specializations of GraphTraits to be able to treat a function as a // graph of basic blocks... these are the same as the basic block iterators, // except that the root node is implicitly the first node of the function. // @@ -243,7 +243,7 @@ template <> struct GraphTraits<const Function*> : }; -// Provide specializations of GraphTraits to be able to treat a function as a +// Provide specializations of GraphTraits to be able to treat a function as a // graph of basic blocks... and to walk it in inverse order. Inverse order for // a function is considered to be when traversing the predecessor edges of a BB // instead of the successor edges. diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h index 1efc34e56a..9df71a2743 100644 --- a/include/llvm/Support/CallSite.h +++ b/include/llvm/Support/CallSite.h @@ -1,10 +1,10 @@ //===-- llvm/Support/CallSite.h - Abstract Call & Invoke instrs -*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines the CallSite class, which is a handy wrapper for code that diff --git a/include/llvm/Support/Casting.h b/include/llvm/Support/Casting.h index d189754865..5132b4ec28 100644 --- a/include/llvm/Support/Casting.h +++ b/include/llvm/Support/Casting.h @@ -1,10 +1,10 @@ //===-- llvm/Support/Casting.h - Allow flexible, checked, casts -*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines the isa<X>(), cast<X>(), dyn_cast<X>(), cast_or_null<X>(), @@ -48,7 +48,7 @@ template<typename From> struct simplify_type<const From> { // if (isa<Type*>(myVal)) { ... } // template <typename To, typename From> -inline bool isa_impl(const From &Val) { +inline bool isa_impl(const From &Val) { return To::classof(&Val); } @@ -57,7 +57,7 @@ struct isa_impl_wrap { // When From != SimplifiedType, we can simplify the type some more by using // the simplify_type template. static bool doit(const From &Val) { - return isa_impl_cl<const SimpleType>::template + return isa_impl_cl<const SimpleType>::template isa<To>(simplify_type<const From>::getSimplifiedValue(Val)); } }; @@ -159,7 +159,7 @@ struct cast_retty_wrap<To, FromTy, FromTy> { template<class To, class From> struct cast_retty { - typedef typename cast_retty_wrap<To, From, + typedef typename cast_retty_wrap<To, From, typename simplify_type<From>::SimpleType>::ret_type ret_type; }; @@ -248,7 +248,7 @@ struct foo { }*/ }; -template <> inline bool isa_impl<foo,bar>(const bar &Val) { +template <> inline bool isa_impl<foo,bar>(const bar &Val) { cerr << "Classof: " << &Val << "\n"; return true; } @@ -279,7 +279,7 @@ void test(bar &B1, const bar *B2) { const foo *F12 = cast_or_null<foo>(B2); const foo *F13 = cast_or_null<foo>(B4); const foo *F14 = cast_or_null<foo>(fub()); // Shouldn't print. - + // These lines are errors... //foo *F20 = cast<foo>(B2); // Yields const foo* //foo &F21 = cast<foo>(B3); // Yields const foo& diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 90f38bce2d..e0c5c8f8c0 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -1,10 +1,10 @@ //===- llvm/Support/CommandLine.h - Command line handler --------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This class implements a command line argument processor that is useful when @@ -126,14 +126,14 @@ class Option { // an argument. Should return true if there was an error processing the // argument and the program should exit. // - virtual bool handleOccurrence(unsigned pos, const char *ArgName, + virtual bool handleOccurrence(unsigned pos, const char *ArgName, const std::string &Arg) = 0; - virtual enum NumOccurrences getNumOccurrencesFlagDefault() const { + virtual enum NumOccurrences getNumOccurrencesFlagDefault() const { return Optional; } virtual enum ValueExpected getValueExpectedFlagDefault() const { - return ValueOptional; + return ValueOptional; } virtual enum OptionHidden getOptionHiddenFlagDefault() const { return NotHidden; @@ -216,14 +216,14 @@ public: // Return the width of the option tag for printing... virtual unsigned getOptionWidth() const = 0; - // printOptionInfo - Print out information about this option. The + // printOptionInfo - Print out information about this option. The // to-be-maintained width is specified. // virtual void printOptionInfo(unsigned GlobalWidth) const = 0; // addOccurrence - Wrapper around handleOccurrence that enforces Flags // - bool addOccurrence(unsigned pos, const char *ArgName, + bool addOccurrence(unsigned pos, const char *ArgName, const std::string &Value); // Prints option name followed by message. Always returns true. @@ -311,7 +311,7 @@ class ValuesClass { std::vector<std::pair<const char *, std::pair<int, const char *> > > Values; void processValues(va_list Vals); public: - ValuesClass(const char *EnumName, DataType Val, const char *Desc, + ValuesClass(const char *EnumName, DataType Val, const char *Desc, va_list ValueArgs) { // Insert the first value, which is required. Values.push_back(std::make_pair(EnumName, std::make_pair(Val, Desc))); @@ -366,14 +366,14 @@ struct generic_parser_base { // getOption - Return option name N. virtual const char *getOption(unsigned N) const = 0; - + // getDescription - Return description N virtual const char *getDescription(unsigned N) const = 0; // Return the width of the option tag for printing... virtual unsigned getOptionWidth(const Option &O) const; - // printOptionInfo - Print out information about this option. The + // printOptionInfo - Print out information about this option. The // to-be-maintained width is specified. // virtual void printOptionInfo(const Option &O, unsigned GlobalWidth) const; @@ -442,7 +442,7 @@ public: } // parse - Return true on error. - bool parse(Option &O, const char *ArgName, const std::string &Arg, + bool parse(Option &O, const char *ArgName, const std::string &Arg, DataType &V) { std::string ArgVal; if (hasArgStr) @@ -485,12 +485,12 @@ struct basic_parser_impl { // non-template implementation of basic_parser<t> enum ValueExpected getValueExpectedFlagDefault() const { return ValueRequired; } - + void initialize(Option &O) {} - + // Return the width of the option tag for printing... unsigned getOptionWidth(const Option &O) const; - + // printOptionInfo - Print out information about this option. The // to-be-maintained width is specified. // @@ -519,7 +519,7 @@ public: bool parse(Option &O, const char *ArgName, const std::string &Arg, bool &Val); enum ValueExpected getValueExpectedFlagDefault() const { - return ValueOptional; + return ValueOptional; } // getValueName - Do not print =<value> at all @@ -590,7 +590,7 @@ template<> class parser<std::string> : public basic_parser<std::string> { public: // parse - Return true on error. - bool parse(Option &O, const char *AN, const std::string &Arg, + bool parse(Option &O, const char *AN, const std::string &Arg, std::string &Value) { Value = Arg; return false; @@ -727,12 +727,12 @@ public: // template <class DataType, bool ExternalStorage = false, class ParserClass = parser<DataType> > -class opt : public Option, +class opt : public Option, public opt_storage<DataType, ExternalStorage, is_class<DataType>::value> { ParserClass Parser; - virtual bool handleOccurrence(unsigned pos, const char *ArgName, + virtual bool handleOccurrence(unsigned pos, const char *ArgName, const std::string &Arg) { typename ParserClass::parser_data_type Val; if (Parser.parse(*this, ArgName, Arg, Val)) @@ -884,14 +884,14 @@ class list : public Option, public list_storage<DataType, Storage> { std::vector<unsigned> Positions; ParserClass Parser; - virtual enum NumOccurrences getNumOccurrencesFlagDefault() const { + virtual enum NumOccurrences getNumOccurrencesFlagDefault() const { return ZeroOrMore; } virtual enum ValueExpected getValueExpectedFlagDefault() const { return Parser.getValueExpectedFlagDefault(); } - virtual bool handleOccurrence(unsigned pos, const char *ArgName, + virtual bool handleOccurrence(unsigned pos, const char *ArgName, const std::string &Arg) { typename ParserClass::parser_data_type Val; if (Parser.parse(*this, ArgName, Arg, Val)) @@ -915,9 +915,9 @@ class list : public Option, public list_storage<DataType, Storage> { public: ParserClass &getParser() { return Parser; } - unsigned getPosition(unsigned optnum) const { + unsigned getPosition(unsigned optnum) const { assert(optnum < this->size() && "Invalid option index"); - return Positions[optnum]; + return Positions[optnum]; } // One option... @@ -987,7 +987,7 @@ public: class alias : public Option { Option *AliasFor; - virtual bool handleOccurrence(unsigned pos, const char *ArgName, + virtual bool handleOccurrence(unsigned pos, const char *ArgName, const std::string &Arg) { return AliasFor->handleOccurrence(pos, AliasFor->ArgStr, Arg); } diff --git a/include/llvm/Support/Compressor.h b/include/llvm/Support/Compressor.h index 4545628dc0..596e62905c 100644 --- a/include/llvm/Support/Compressor.h +++ b/include/llvm/Support/Compressor.h @@ -1,10 +1,10 @@ //===- llvm/Support/Compressor.h --------------------------------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // -// This file was developed by Reid Spencer and is distributed under the +// This file was developed by Reid Spencer and is distributed under the // University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file declares the llvm::Compressor class. @@ -23,15 +23,15 @@ namespace llvm { /// a block of memory. The algorithm used here is currently bzip2 but that /// may change without notice. Should newer algorithms prove to compress /// bytecode better than bzip2, that newer algorithm will be added, but won't - /// replace bzip2. This interface allows us to abstract the notion of - /// compression and deal with alternate compression schemes over time. - /// The type of compression used can be determined by inspecting the - /// first byte of the compressed output. Currently value '0' means no + /// replace bzip2. This interface allows us to abstract the notion of + /// compression and deal with alternate compression schemes over time. + /// The type of compression used can be determined by inspecting the + /// first byte of the compressed output. Currently value '0' means no /// compression was used (for very small files) and value '2' means bzip2 - /// compression was used. The Compressor is intended for use with memory + /// compression was used. The Compressor is intended for use with memory /// mapped files where the entire data block to be compressed or decompressed /// is available in memory. However, output can be gathered in repeated calls - /// to a callback. Utilities for sending compressed or decompressed output + /// to a callback. Utilities for sending compressed or decompressed output /// to a stream or directly to a memory block are also provided. /// @since 1.4 /// @brief An abstraction for memory to memory data (de)compression @@ -39,8 +39,8 @@ namespace llvm { /// @name High Level Interface /// @{ public: - /// This method compresses a block of memory pointed to by \p in with - /// size \p size to a block of memory, \p out, that is allocated with + /// This method compresses a block of memory pointed to by \p in with + /// size \p size to a block of memory, \p out, that is allocated with /// malloc. It is the caller's responsibility to free \p out. The \p hint /// indicates which type of compression the caller would *prefer*. /// @throws std::string explaining error if a compression error occurs @@ -52,10 +52,10 @@ namespace llvm { char*&out ///< The returned output buffer ); - /// This method compresses a block of memory pointed to by \p in with + /// This method compresses a block of memory pointed to by \p in with /// size \p size to a stream. The stream \p out must be open and ready for /// writing when this method is called. The stream will not be closed by - /// this method. The \p hint argument indicates which type of + /// this method. The \p hint argument indicates which type of /// compression the caller would *prefer*. /// @returns The amount of data written to \p out. /// @brief Compress memory to a file. @@ -65,9 +65,9 @@ namespace llvm { std::ostream& out ///< The output stream to write data on ); - /// This method decompresses a block of memory pointed to by \p in with + /// This method decompresses a block of memory pointed to by \p in with /// size \p size to a new block of memory, \p out, \p that was allocated - /// by malloc. It is the caller's responsibility to free \p out. + /// by malloc. It is the caller's responsibility to free \p out. /// @returns The size of the output buffer \p out. /// @brief Decompress memory to a new memory buffer. static size_t decompressToNewBuffer( @@ -76,10 +76,10 @@ namespace llvm { char*&out ///< The returned output buffer ); - /// This method decompresses a block of memory pointed to by \p in with + /// This method decompresses a block |