diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2005-04-21 20:19:05 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2005-04-21 20:19:05 +0000 |
commit | 9769ab22265b313171d201b5928688524a01bd87 (patch) | |
tree | 4215db61d3b617687d0eec4ed3caf7dbf973f4ca /include/llvm/Analysis | |
parent | 109026290b3b07152322e65801edb51dccfe7ddc (diff) | |
download | external_llvm-9769ab22265b313171d201b5928688524a01bd87.tar.gz external_llvm-9769ab22265b313171d201b5928688524a01bd87.tar.bz2 external_llvm-9769ab22265b313171d201b5928688524a01bd87.zip |
Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
29 files changed, 198 insertions, 198 deletions
diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h index 0857190c5c..c63d9908e2 100644 --- a/include/llvm/Analysis/AliasAnalysis.h +++ b/include/llvm/Analysis/AliasAnalysis.h @@ -1,10 +1,10 @@ //===- llvm/Analysis/AliasAnalysis.h - Alias Analysis Interface -*- 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 generic AliasAnalysis interface, which is used as the @@ -50,7 +50,7 @@ protected: /// called multiple times. /// void InitializeAliasAnalysis(Pass *P); - + // getAnalysisUsage - All alias analysis implementations should invoke this // directly (using AliasAnalysis::getAnalysisUsage(AU)) to make sure that // TargetData is required by the pass. @@ -108,8 +108,8 @@ public: /// bits which may be or'd together. /// enum ModRefResult { NoModRef = 0, Ref = 1, Mod = 2, ModRef = 3 }; - - + + /// ModRefBehavior - Summary of how a function affects memory in the program. /// Loads from constant globals are not considered memory accesses for this /// interface. Also, functions may freely modify stack space local to their @@ -120,14 +120,14 @@ public: // // This property corresponds to the GCC 'const' attribute. DoesNotAccessMemory, - + // AccessesArguments - This function accesses function arguments in // non-volatile and well known ways, but does not access any other memory. // // Clients may call getArgumentAccesses to get specific information about // how pointer arguments are used. AccessesArguments, - + // AccessesArgumentsAndGlobals - This function has accesses function // arguments and global variables in non-volatile and well-known ways, but // does not access any other memory. @@ -135,18 +135,18 @@ public: // Clients may call getArgumentAccesses to get specific information about // how pointer arguments and globals are used. AccessesArgumentsAndGlobals, - + // OnlyReadsMemory - This function does not perform any non-local stores or // volatile loads, but may read from any memory location. // // This property corresponds to the GCC 'pure' attribute. OnlyReadsMemory, - + // UnknownModRefBehavior - This indicates that the function could not be // classified into one of the behaviors above. UnknownModRefBehavior }; - + /// PointerAccessInfo - This struct is used to return results for pointers, /// globals, and the return value of a function. struct PointerAccessInfo { @@ -154,11 +154,11 @@ public: /// the function, a GlobalVariable, or null, corresponding to the return /// value for the function. Value *V; - + /// ModRefInfo - Whether the pointer is loaded or stored to/from. /// ModRefResult ModRefInfo; - + /// AccessType - Specific fine-grained access information for the argument. /// If none of these classifications is general enough, the /// getModRefBehavior method should not return AccessesArguments*. If a @@ -168,25 +168,25 @@ public: /// ScalarAccess - The pointer is dereferenced. /// ScalarAccess, - + /// ArrayAccess - The pointer is indexed through as an array of elements. /// ArrayAccess, - + /// ElementAccess ?? P->F only? - + /// CallsThrough - Indirect calls are made through the specified function /// pointer. CallsThrough, }; - }; - + }; + /// getModRefBehavior - Return the behavior of the specified function if /// called from the specified call site. The call site may be null in which /// case the most generic behavior of this function should be returned. virtual ModRefBehavior getModRefBehavior(Function *F, CallSite CS, std::vector<PointerAccessInfo> *Info = 0); - + /// doesNotAccessMemory - If the specified function is known to never read or /// write memory, return true. If the function only reads from known-constant /// memory, it is also legal to return true. Functions that unwind the stack diff --git a/include/llvm/Analysis/AliasSetTracker.h b/include/llvm/Analysis/AliasSetTracker.h index cf8c558c12..2f693d41f8 100644 --- a/include/llvm/Analysis/AliasSetTracker.h +++ b/include/llvm/Analysis/AliasSetTracker.h @@ -1,17 +1,17 @@ //===- llvm/Analysis/AliasSetTracker.h - Build Alias Sets -------*- 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 two classes: AliasSetTracker and AliasSet. These interface // are used to classify a collection of pointer references into a maximal number // of disjoint sets. Each AliasSet object constructed by the AliasSetTracker // object refers to memory disjoint from the other sets. -// +// //===----------------------------------------------------------------------===// #ifndef LLVM_ANALYSIS_ALIASSETTRACKER_H @@ -58,7 +58,7 @@ class AliasSet { unsigned getSize() const { return Size; } - AliasSet *getAliasSet(AliasSetTracker &AST) { + AliasSet *getAliasSet(AliasSetTracker &AST) { assert(AS && "No AliasSet yet!"); if (AS->Forward) { AliasSet *OldAS = AS; @@ -163,7 +163,7 @@ public: HashNodePair *CurNode; public: iterator(HashNodePair *CN = 0) : CurNode(CN) {} - + bool operator==(const iterator& x) const { return CurNode == x.CurNode; } @@ -173,7 +173,7 @@ public: CurNode = I.CurNode; return *this; } - + value_type &operator*() const { assert(CurNode && "Dereferencing AliasSet.end()!"); return *CurNode; @@ -182,14 +182,14 @@ public: Value *getPointer() const { return CurNode->first; } unsigned getSize() const { return CurNode->second.getSize(); } - + iterator& operator++() { // Preincrement assert(CurNode && "Advancing past AliasSet.end()!"); CurNode = CurNode->second.getNext(); return *this; } iterator operator++(int) { // Postincrement - iterator tmp = *this; ++*this; return tmp; + iterator tmp = *this; ++*this; return tmp; } }; @@ -306,7 +306,7 @@ public: AliasSet *getAliasSetForPointerIfExists(Value *P, unsigned Size) { return findAliasSetForPointer(P, Size); } - + /// containsPointer - Return true if the specified location is represented by /// this alias set, false otherwise. This does not modify the AST object or /// alias sets. diff --git a/include/llvm/Analysis/CFGPrinter.h b/include/llvm/Analysis/CFGPrinter.h index fb3fbdda79..3567db1c71 100644 --- a/include/llvm/Analysis/CFGPrinter.h +++ b/include/llvm/Analysis/CFGPrinter.h @@ -1,10 +1,10 @@ //===-- CFGPrinter.h - CFG printer external interface ------------*- 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 external functions that can be called to explicitly diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h index 446ea500d4..fee5147761 100644 --- a/include/llvm/Analysis/CallGraph.h +++ b/include/llvm/Analysis/CallGraph.h @@ -1,13 +1,13 @@ //===- CallGraph.h - Build a Module's call graph ----------------*- 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 interface is used to build and manipulate a call graph, which is a very +// This interface is used to build and manipulate a call graph, which is a very // useful tool for interprocedural optimization. // // Every function in a module is represented as a node in the call graph. The diff --git a/include/llvm/Analysis/ConstantsScanner.h b/include/llvm/Analysis/ConstantsScanner.h index 48c0bd0875..bf0772dbf1 100644 --- a/include/llvm/Analysis/ConstantsScanner.h +++ b/include/llvm/Analysis/ConstantsScanner.h @@ -1,10 +1,10 @@ //==- llvm/Analysis/ConstantsScanner.h - Iterate over constants -*- 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 an iterator to walk through the constants referenced by @@ -48,7 +48,7 @@ public: : InstI(inst_end(F)), OpIdx(0) { } - inline bool operator==(const _Self& x) const { return OpIdx == x.OpIdx && + inline bool operator==(const _Self& x) const { return OpIdx == x.OpIdx && InstI == x.InstI; } inline bool operator!=(const _Self& x) const { return !operator==(x); } @@ -75,7 +75,7 @@ public: } inline _Self operator++(int) { // Postincrement - _Self tmp = *this; ++*this; return tmp; + _Self tmp = *this; ++*this; return tmp; } inline bool atEnd() const { return InstI.atEnd(); } diff --git a/include/llvm/Analysis/DataStructure/DSGraph.h b/include/llvm/Analysis/DataStructure/DSGraph.h index 430a7bf281..f38b59eb06 100644 --- a/include/llvm/Analysis/DataStructure/DSGraph.h +++ b/include/llvm/Analysis/DataStructure/DSGraph.h @@ -1,10 +1,10 @@ //===- DSGraph.h - Represent a collection of data structures ----*- 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 header defines the data structure graph (DSGraph) and the @@ -25,14 +25,14 @@ namespace llvm { class GlobalValue; //===----------------------------------------------------------------------===// -/// DSScalarMap - An instance of this class is used to keep track of all of +/// DSScalarMap - An instance of this class is used to keep track of all of /// which DSNode each scalar in a function points to. This is specialized to -/// keep track of globals with nodes in the function, and to keep track of the +/// keep track of globals with nodes in the function, and to keep track of the /// unique DSNodeHandle being used by the scalar map. /// -/// This class is crucial to the efficiency of DSA with some large SCC's. In +/// This class is crucial to the efficiency of DSA with some large SCC's. In /// these cases, the cost of iterating over the scalar map dominates the cost -/// of DSA. In all of these cases, the DSA phase is really trying to identify +/// of DSA. In all of these cases, the DSA phase is really trying to identify /// globals or unique node handles active in the function. /// class DSScalarMap { @@ -48,7 +48,7 @@ public: EquivalenceClasses<GlobalValue*> &getGlobalECs() const { return GlobalECs; } - // Compatibility methods: provide an interface compatible with a map of + // Compatibility methods: provide an interface compatible with a map of // Value* to DSNodeHandle's. typedef ValueMapTy::const_iterator const_iterator; typedef ValueMapTy::iterator iterator; @@ -142,11 +142,11 @@ public: return ValueMap.insert(std::make_pair(V, DSNodeHandle())).first->second; } - void erase(iterator I) { + void erase(iterator I) { assert(I != ValueMap.end() && "Cannot erase end!"); if (GlobalValue *GV = dyn_cast<GlobalValue>(I->first)) GlobalSet.erase(GV); - ValueMap.erase(I); + ValueMap.erase(I); } void clear() { @@ -555,7 +555,7 @@ public: if (CloneFlags & DSGraph::StripIncompleteBit) BitsToKeep &= ~DSNode::Incomplete; } - + DSNodeHandle getClonedNH(const DSNodeHandle &SrcNH); void merge(const DSNodeHandle &NH, const DSNodeHandle &SrcNH); diff --git a/include/llvm/Analysis/DataStructure/DSGraphTraits.h b/include/llvm/Analysis/DataStructure/DSGraphTraits.h index 5f8b8d0ade..6febf34625 100644 --- a/include/llvm/Analysis/DataStructure/DSGraphTraits.h +++ b/include/llvm/Analysis/DataStructure/DSGraphTraits.h @@ -1,10 +1,10 @@ //===- DSGraphTraits.h - Provide generic graph interface --------*- 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 provides GraphTraits specializations for the DataStructure graph @@ -28,7 +28,7 @@ class DSNodeIterator : public forward_iterator<const DSNode, ptrdiff_t> { friend class DSNode; NodeTy * const Node; unsigned Offset; - + typedef DSNodeIterator<NodeTy> _Self; DSNodeIterator(NodeTy *N) : Node(N), Offset(0) {} // begin iterator @@ -56,7 +56,7 @@ public: Offset = I.Offset; return *this; } - + pointer operator*() const { if (Node->isDeadNode()) return Node->getForwardNode(); @@ -64,13 +64,13 @@ public: return Node->getLink(Offset).getNode(); } pointer operator->() const { return operator*(); } - + _Self& operator++() { // Preincrement Offset += (1 << DS::PointerShift); return *this; } _Self operator++(int) { // Postincrement - _Self tmp = *this; ++*this; return tmp; + _Self tmp = *this; ++*this; return tmp; } unsigned getOffset() const { return Offset; } diff --git a/include/llvm/Analysis/DataStructure/DSNode.h b/include/llvm/Analysis/DataStructure/DSNode.h index 10394ddd06..7ae167efdb 100644 --- a/include/llvm/Analysis/DataStructure/DSNode.h +++ b/include/llvm/Analysis/DataStructure/DSNode.h @@ -1,10 +1,10 @@ //===- DSNode.h - Node definition for datastructure 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. -// +// //===----------------------------------------------------------------------===// // // Data structure graph nodes and some implementation of DSNodeHandle. @@ -84,7 +84,7 @@ public: AllocaNode = 1 << 0, // This node was allocated with alloca HeapNode = 1 << 1, // This node was allocated with malloc GlobalNode = 1 << 2, // This node was allocated by a global var decl - UnknownNode = 1 << 3, // This node points to unknown allocated memory + UnknownNode = 1 << 3, // This node points to unknown allocated memory Incomplete = 1 << 4, // This node may not be complete Modified = 1 << 5, // This node is modified in this context @@ -97,7 +97,7 @@ public: Composition = AllocaNode | HeapNode | GlobalNode | UnknownNode, }; - + /// NodeType - A union of the above bits. "Shadow" nodes do not add any flags /// to the nodes in the data structure graph, so it is possible to have nodes /// with a value of 0 for their NodeType. @@ -105,7 +105,7 @@ public: private: unsigned short NodeType; public: - + /// DSNode ctor - Create a node of the specified type, inserting it into the /// specified graph. /// diff --git a/include/llvm/Analysis/DataStructure/DSSupport.h b/include/llvm/Analysis/DataStructure/DSSupport.h index e4eb21bc23..2fc52db25f 100644 --- a/include/llvm/Analysis/DataStructure/DSSupport.h +++ b/include/llvm/Analysis/DataStructure/DSSupport.h @@ -1,10 +1,10 @@ //===- DSSupport.h - Support for datastructure 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. -// +// //===----------------------------------------------------------------------===// // // Support for graph nodes, call sites, and types. @@ -161,7 +161,7 @@ namespace llvm { /// DSCallSite - Representation of a call site via its call instruction, /// the DSNode handle for the callee function (or function pointer), and /// the DSNode handles for the function arguments. -/// +/// class DSCallSite { CallSite Site; // Actual call site Function *CalleeF; // The function called (direct call) diff --git a/include/llvm/Analysis/DataStructure/DataStructure.h b/include/llvm/Analysis/DataStructure/DataStructure.h index 32299473f4..e110d581db 100644 --- a/include/llvm/Analysis/DataStructure/DataStructure.h +++ b/include/llvm/Analysis/DataStructure/DataStructure.h @@ -1,10 +1,10 @@ //===- DataStructure.h - Build data structure 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. -// +// //===----------------------------------------------------------------------===// // // Implement the LLVM data structure analysis library. @@ -82,7 +82,7 @@ public: /// releaseMemory - if the pass pipeline is done with this pass, we can /// release our memory... - /// + /// virtual void releaseMemory(); /// getAnalysisUsage - This obviously provides a data structure graph. @@ -177,7 +177,7 @@ private: DSGraph &getOrCreateGraph(Function *F); unsigned calculateGraphs(Function *F, std::vector<Function*> &Stack, - unsigned &NextID, + unsigned &NextID, hash_map<Function*, unsigned> &ValMap); }; @@ -313,7 +313,7 @@ struct CompleteBUDataStructures : public BUDataStructures { private: unsigned calculateSCCGraphs(DSGraph &FG, std::vector<DSGraph*> &Stack, - unsigned &NextID, + unsigned &NextID, hash_map<DSGraph*, unsigned> &ValMap); DSGraph &getOrCreateGraph(Function &F); void processGraph(DSGraph &G); @@ -327,99 +327,99 @@ private: /// struct EquivClassGraphs : public ModulePass { CompleteBUDataStructures *CBU; - + DSGraph *GlobalsGraph; - + // DSInfo - one graph for each function. hash_map<const Function*, DSGraph*> DSInfo; - + /// ActualCallees - The actual functions callable from indirect call sites. /// std::set<std::pair<Instruction*, Function*> > ActualCallees; - + // Equivalence class where functions that can potentially be called via the // same function pointer are in the same class. EquivalenceClasses<Function*> FuncECs; - + /// OneCalledFunction - For each indirect call, we keep track of one /// target of the call. This is used to find equivalence class called by /// a call site. std::map<DSNode*, Function *> OneCalledFunction; - + /// GlobalECs - The equivalence classes for each global value that is merged /// with other global values in the DSGraphs. EquivalenceClasses<GlobalValue*> GlobalECs; - + public: /// EquivClassGraphs - Computes the equivalence classes and then the /// folded DS graphs for each class. - /// + /// virtual bool runOnModule(Module &M); - + /// print - Print out the analysis results... /// void print(std::ostream &O, const Module *M) const; - + EquivalenceClasses<GlobalValue*> &getGlobalECs() { return GlobalECs; } - + /// getDSGraph - Return the data structure graph for the specified function. /// This returns the folded graph. The folded graph is the same as the CBU - /// graph iff the function is in a singleton equivalence class AND all its + /// graph iff the function is in a singleton equivalence class AND all its /// callees also have the same folded graph as the CBU graph. - /// + /// DSGraph &getDSGraph(const Function &F) const { hash_map<const Function*, DSGraph*>::const_iterator I = DSInfo.find(&F); assert(I != DSInfo.end() && "No graph computed for that function!"); return *I->second; } - + bool hasGraph(const Function &F) const { return DSInfo.find(&F) != DSInfo.end(); } - + /// ContainsDSGraphFor - Return true if we have a graph for the specified /// function. bool ContainsDSGraphFor(const Function &F) const { return DSInfo.find(&F) != DSInfo.end(); } - + /// getSomeCalleeForCallSite - Return any one callee function at /// a call site. - /// + /// Function *getSomeCalleeForCallSite(const CallSite &CS) const; - + DSGraph &getGlobalsGraph() const { return *GlobalsGraph; } - + typedef std::set<std::pair<Instruction*, Function*> > ActualCalleesTy; const ActualCalleesTy &getActualCallees() const { return ActualCallees; } - + typedef ActualCalleesTy::const_iterator callee_iterator; callee_iterator callee_begin(Instruction *I) const { return ActualCallees.lower_bound(std::pair<Instruction*,Function*>(I, 0)); } - + callee_iterator callee_end(Instruction *I) const { I = (Instruction*)((char*)I + 1); return ActualCallees.lower_bound(std::pair<Instruction*,Function*>(I, 0)); } - + virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired<CompleteBUDataStructures>(); } - + private: void buildIndirectFunctionSets(Module &M); - + unsigned processSCC(DSGraph &FG, std::vector<DSGraph*> &Stack, - unsigned &NextID, + unsigned &NextID, std::map<DSGraph*, unsigned> &ValMap); void processGraph(DSGraph &FG); - + DSGraph &getOrCreateGraph(Function &F); }; diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index c901911495..74ac293af7 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -1,10 +1,10 @@ //===- llvm/Analysis/Dominators.h - Dominator Info Calculation --*- 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 following classes: @@ -13,13 +13,13 @@ // 2. DominatorSet: Calculates the [reverse] dominator set for a function // 3. DominatorTree: Represent the ImmediateDominator as an explicit tree // structure. -// 4. DominanceFrontier: Calculate and hold the dominance frontier for a +// 4. DominanceFrontier: Calculate and hold the dominance frontier for a // function. // // These data structures are listed in increasing order of complexity. It -// takes longer to calculate the dominator frontier, for example, than the +// takes longer to calculate the dominator frontier, for example, than the // ImmediateDominator mapping. -// +// //===----------------------------------------------------------------------===// #ifndef LLVM_ANALYSIS_DOMINATORS_H @@ -140,9 +140,9 @@ private: unsigned Semi; unsigned Size; BasicBlock *Label, *Parent, *Child, *Ancestor; - + std::vector<BasicBlock*> Bucket; - + InfoRec() : Semi(0), Size(0), Label(0), Parent(0), Child(0), Ancestor(0){} }; @@ -306,7 +306,7 @@ public: inline Node *getIDom() const { return IDom; } inline const std::vector<Node*> &getChildren() const { return Children; } - /// dominates - Returns true iff this dominates N. Note that this is not a + /// dominates - Returns true iff this dominates N. Note that this is not a /// constant time operation! /// inline bool dominates(const Node *N) const { diff --git a/include/llvm/Analysis/Expressions.h b/include/llvm/Analysis/Expressions.h index 8b02b14538..b04d787929 100644 --- a/include/llvm/Analysis/Expressions.h +++ b/include/llvm/Analysis/Expressions.h @@ -1,17 +1,17 @@ //===- llvm/Analysis/Expressions.h - Expression Analysis Utils --*- 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 a package of expression analysis utilties: // // ClassifyExpr: Analyze an expression to determine the complexity of the // expression, and which other variables it depends on. -// +// //===----------------------------------------------------------------------===// #ifndef LLVM_ANALYSIS_EXPRESSIONS_H diff --git a/include/llvm/Analysis/FindUnsafePointerTypes.h b/include/llvm/Analysis/FindUnsafePointerTypes.h index 2d453f087a..d1f2709325 100644 --- a/include/llvm/Analysis/FindUnsafePointerTypes.h +++ b/include/llvm/Analysis/FindUnsafePointerTypes.h @@ -1,13 +1,13 @@ //===- llvm/Analysis/FindUnsafePointerTypes.h - Unsafe pointers -*- 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 a pass that can be used to determine, interprocedurally, +// This file defines a pass that can be used to determine, interprocedurally, // which pointer types are accessed unsafely in a program. If there is an // "unsafe" access to a specific pointer type, transformations that depend on // type safety cannot be permitted. @@ -18,7 +18,7 @@ // Additionally, this analysis exports a hidden command line argument that (when // enabled) prints out the reasons a type was determined to be unsafe. Just add // -printunsafeptrinst to the command line of the tool you want to get it. -// +// //===----------------------------------------------------------------------===// #ifndef LLVM_ANALYSIS_UNSAFEPOINTERTYPES_H diff --git a/include/llvm/Analysis/FindUsedTypes.h b/include/llvm/Analysis/FindUsedTypes.h index 143d6ce031..0595dc331b 100644 --- a/include/llvm/Analysis/FindUsedTypes.h +++ b/include/llvm/Analysis/FindUsedTypes.h @@ -1,10 +1,10 @@ //===- llvm/Analysis/FindUsedTypes.h - Find all Types in use ----*- 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 pass is used to seek out all of the types in use by the program. diff --git a/include/llvm/Analysis/Interval.h b/include/llvm/Analysis/Interval.h index 91e1da6a01..e91e66d0d6 100644 --- a/include/llvm/Analysis/Interval.h +++ b/include/llvm/Analysis/Interval.h @@ -1,15 +1,15 @@ //===- llvm/Analysis/Interval.h - Interval Class Declaration ----*- 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 declaration of the Interval class, which // represents a set of CFG nodes and is a portion of an interval partition. -// +// // Intervals have some interesting and useful properties, including the // following: // 1. The header node of an interval dominates all of the elements of the @@ -86,9 +86,9 @@ public: //return find(Successors.begin(), Successors.end(), BB) != Successors.end(); } - /// Equality operator. It is only valid to compare two intervals from the same - /// partition, because of this, all we have to check is the header node for - /// equality. + /// Equality operator. It is only valid to compare two intervals from the + /// same partition, because of this, all we have to check is the header node + /// for equality. /// inline bool operator==(const Interval &I) const { return HeaderNode == I.HeaderNode; @@ -131,7 +131,7 @@ template <> struct GraphTraits<Interval*> { 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); } }; @@ -140,10 +140,10 @@ template <> struct GraphTraits<Inverse<Interval*> > { typedef Interval NodeType; typedef Interval::pred_iterator ChildIteratorType; static NodeType *getEntryNode(Inverse<Interval *> 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); } }; diff --git a/include/llvm/Analysis/IntervalIterator.h b/include/llvm/Analysis/IntervalIterator.h index c6a87bdf94..3b1c6c9297 100644 --- a/include/llvm/Analysis/IntervalIterator.h +++ b/include/llvm/Analysis/IntervalIterator.h @@ -1,16 +1,16 @@ //===- IntervalIterator.h - Interval Iterator Declaration -------*- 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 an iterator that enumerates the intervals in a control flow // graph of some sort. This iterator is parametric, allowing iterator over the // following types of graphs: -// +// // 1. A Function* object, composed of BasicBlock nodes. // 2. An IntervalPartition& object, composed of Interval nodes. // @@ -18,9 +18,9 @@ // in depth first order. These intervals are completely filled in except for // the predecessor fields (the successor information is filled in however). // -// By default, the intervals created by this iterator are deleted after they +// By default, the intervals created by this iterator are deleted after they // are no longer any use to the iterator. This behavior can be changed by -// passing a false value into the intervals_begin() function. This causes the +// passing a false value into the intervals_begin() function. This causes the // IOwnMem member to be set, and the intervals to not be deleted. // // It is only safe to use this if all of the intervals are deleted by the caller @@ -42,27 +42,27 @@ namespace llvm { -// getNodeHeader - Given a source graph node and the source graph, return the +// getNodeHeader - Given a source graph node and the source graph, return the // BasicBlock that is the header node. This is the opposite of // getSourceGraphNode. // inline BasicBlock *getNodeHeader(BasicBlock *BB) { return BB; } inline BasicBlock *getNodeHeader(Interval *I) { return I->getHeaderNode(); } -// getSourceGraphNode - Given a BasicBlock and the source graph, return the +// getSourceGraphNode - Given a BasicBlock and the source graph, return the // source graph node that corresponds to the BasicBlock. This is the opposite // of getNodeHeader. // inline BasicBlock *getSourceGraphNode(Function *, BasicBlock *BB) { - return BB; + return BB; } -inline Interval *getSourceGraphNode(IntervalPartition *IP, BasicBlock *BB) { +inline Interval *getSourceGraphNode(IntervalPartition *IP, BasicBlock *BB) { return IP->getBlockInterval(BB); } // addNodeToInterval - This method exists to assist the generic ProcessNode -// with the task of adding a node to the new interval, depending on the -// type of the source node. In the case of a CFG source graph (BasicBlock +// with the task of adding a node to the new interval, depending on the +// type of the source node. In the case of a CFG source graph (BasicBlock // case), the BasicBlock itself is added to the interval. // inline void addNodeToInterval(Interval *Int, BasicBlock *BB) { @@ -70,8 +70,8 @@ inline void addNodeToInterval(Interval *Int, BasicBlock *BB) { } // addNodeToInterval - This method exists to assist the generic ProcessNode -// with the task of adding a node to the new interval, depending on the -// type of the source node. In the case of a CFG source graph (BasicBlock +// with the task of adding a node to the new interval, depending on the +// type of the source node. In the case of a CFG source graph (BasicBlock // case), the BasicBlock itself is added to the interval. In the case of // an IntervalPartition source graph (Interval case), all of the member // BasicBlocks are added to the interval. @@ -96,7 +96,7 @@ class IntervalIterator { public: typedef IntervalIterator<NodeTy, OrigContainer_t> _Self; typedef std::forward_iterator_tag iterator_category; - + IntervalIterator() {} // End iterator, empty stack IntervalIterator(Function *M, bool OwnMemory) : IOwnMem(OwnMemory) { OrigContainer = M; @@ -148,14 +148,14 @@ public: IntStack.pop(); } while (!IntStack.empty()); - return *this; + return *this; } inline _Self operator++(int) { // Postincrement - _Self tmp = *this; ++*this; return tmp; + _Self tmp = *this; ++*this; return tmp; } private: - // ProcessInterval - This method is used during the construction of the + // ProcessInterval - This method is used during the construction of the // interval graph. It walks through the source graph, recursively creating // an interval per invokation until the entire graph is covered. This uses // the ProcessNode method to add all of the nodes to the interval. @@ -178,7 +178,7 @@ private: IntStack.push(std::make_pair(Int, succ_begin(Int))); return true; } - + // ProcessNode - This method is called by ProcessInterval to add nodes to the // interval being constructed, and it is also called recursively as it walks // the source graph. A node is added to the current interval only if all of @@ -191,7 +191,7 @@ private: void ProcessNode(Interval *Int, NodeTy *Node) { assert(Int && "Null interval == bad!"); assert(Node && "Null Node == bad!"); - + BasicBlock *NodeHeader = getNodeHeader(Node); if (Visited.count(NodeHeader)) { // Node already been visited? @@ -202,7 +202,7 @@ private: Int->Successors.push_back(NodeHeader); } } else { // Otherwise, not in interval yet - for (typename IGT::ChildIteratorType I = IGT::child_begin(Node), + for (typename IGT::ChildIteratorType I = IGT::child_begin(Node), E = IGT::child_end(Node); I != E; ++I) { if (!Int->contains(*I)) { // If pred not in interval, we can't be if (!Int->isSuccessor(NodeHeader)) // Add only if not already in set @@ -215,14 +215,14 @@ private: // already. In this case, we must add BB to the interval! addNodeToInterval(Int, Node); Visited.insert(NodeHeader); // The node has now been visited! - + if (Int->isSuccessor(NodeHeader)) { // If we were in the successor list from before... remove from succ list Int->Successors.erase(std::remove(Int->Successors.begin(), - Int->Successors.end(), NodeHeader), + Int->Successors.end(), NodeHeader), Int->Successors.end()); } - + // Now that we have discovered that Node is in the interval, perhaps some // of its successors are as well? for (typename GT::ChildIteratorType It = GT::child_begin(Node), @@ -236,7 +236,7 @@ typedef IntervalIterator<BasicBlock, Function> function_interval_iterator; typedef IntervalIterator<Interval, IntervalPartition> interval_part_interval_iterator; -inline function_interval_iterator intervals_begin(Function *F, +inline function_interval_iterator intervals_begin(Function *F, bool DeleteInts = true) { return function_interval_iterator(F, DeleteInts); } @@ -244,7 +244,7 @@ inline function_interval_iterator intervals_end(Function *) { return function_interval_iterator(); } -inline interval_part_interval_iterator +inline interval_part_interval_iterator intervals_begin(IntervalPartition &IP, bool DeleteIntervals = true) { return interval_part_interval_iterator(IP, DeleteIntervals); } diff --git a/include/llvm/Analysis/IntervalPartition.h b/include/llvm/Analysis/IntervalPartition.h index d5dd64eca7..1cc903cae1 100644 --- a/include/llvm/Analysis/IntervalPartition.h +++ b/include/llvm/Analysis/IntervalPartition.h @@ -1,10 +1,10 @@ //===- IntervalPartition.h - Interval partition Calculation -----*- 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 declaration of the IntervalPartition class, which diff --git a/include/llvm/Analysis/LoadValueNumbering.h b/include/llvm/Analysis/LoadValueNumbering.h index 212a04bbb5..b92459583d 100644 --- a/include/llvm/Analysis/LoadValueNumbering.h +++ b/include/llvm/Analysis/LoadValueNumbering.h @@ -1,10 +1,10 @@ //===- llvm/Analysis/LoadValueNumbering.h - Value # Load Insts --*- 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 a value numbering pass that value #'s load instructions. diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index 402897c1fd..83befaf378 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -1,10 +1,10 @@ //===- llvm/Analysis/LoopInfo.h - Natural Loop Calculator -------*- 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 LoopInfo class that is used to identify natural loops @@ -41,8 +41,8 @@ class PHINode; class Instruction; //===----------------------------------------------------------------------===// -/// Loop class - Instances of this class are used to represent loops that are -/// detected in the flow graph +/// Loop class - Instances of this class are used to represent loops that are +/// detected in the flow graph /// class Loop { Loop *ParentLoop; @@ -307,10 +307,10 @@ template <> struct GraphTraits<const Loop*> { typedef std::vector<Loop*>::const_iterator ChildIteratorType; static NodeType *getEntryNode(const Loop *L) { return L; } - static inline ChildIteratorType child_begin(NodeType *N) { + static inline ChildIteratorType child_begin(NodeType *N) { return N->begin(); } - static inline ChildIteratorType child_end(NodeType *N) { + static inline ChildIteratorType child_end(NodeType *N) { return N->end(); } }; @@ -320,10 +320,10 @@ template <> struct GraphTraits<Loop*> { typedef std::vector<Loop*>::const_iterator ChildIteratorType; static NodeType *getEntryNode(Loop *L) { return L; } - static inline ChildIteratorType child_begin(NodeType *N) { + static inline ChildIteratorType child_begin(NodeType *N) { return N->begin(); } - static inline ChildIteratorType child_end(NodeType *N) { + static inline ChildIteratorType child_end(NodeType *N) { return N->end(); } }; diff --git a/include/llvm/Analysis/Passes.h b/include/llvm/Analysis/Passes.h index d9ec91b735..5a559de604 100644 --- a/include/llvm/Analysis/Passes.h +++ b/include/llvm/Analysis/Passes.h @@ -1,10 +1,10 @@ //===-- llvm/Analysis/Passes.h - Constructors for analyses ------*- 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 header file defines prototypes for accessor functions that expose passes @@ -47,55 +47,55 @@ namespace llvm { // createNoAAPass - This pass implements a "I don't know" alias analysis. // ImmutablePass *createNoAAPass(); - + //===--------------------------------------------------------------------===// // // createBasicAliasAnalysisPass - This pass implements the default alias // analysis. // ImmutablePass *createBasicAliasAnalysisPass(); - + //===--------------------------------------------------------------------===// // // createAndersensPass - This pass implements Andersen's interprocedural alias // analysis. // ModulePass *createAndersensPass(); - + //===--------------------------------------------------------------------===// // // createBasicVNPass - This pass walks SSA def-use chains to trivially // identify lexically identical expressions. // ImmutablePass *createBasicVNPass(); - + //===--------------------------------------------------------------------===// // // createProfileLoaderPass - This pass loads information from a profile dump // file. // ModulePass *createProfileLoaderPass(); - + //===--------------------------------------------------------------------===// // // createNoProfileInfoPass - This pass implements the default "no profile". // ImmutablePass *createNoProfileInfoPass(); - + //===--------------------------------------------------------------------===// // // createDSAAPass - This pass implements simple context sensitive alias // analysis. // ModulePass *createDSAAPass(); - + //===--------------------------------------------------------------------===// // // createDSOptPass - This pass uses DSA to do a series of simple // optimizations. // ModulePass *createDSOptPass(); - + //===--------------------------------------------------------------------===// // // createSteensgaardPass - This pass uses the data structure graphs to do a diff --git a/include/llvm/Analysis/PostDominators.h b/include/llvm/Analysis/PostDominators.h index 2386f9d125..992a0cef7a 100644 --- a/include/llvm/Analysis/PostDominators.h +++ b/include/llvm/Analysis/PostDominators.h @@ -1,10 +1,10 @@ //=- llvm/Analysis/PostDominators.h - Post Dominator Calculation-*- 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 exposes interfaces to post dominance information. diff --git a/include/llvm/Analysis/ProfileInfo.h b/include/llvm/Analysis/ProfileInfo.h index a31bedf6c6..88b2ea1c8c 100644 --- a/include/llvm/Analysis/ProfileInfo.h +++ b/include/llvm/Analysis/ProfileInfo.h @@ -1,10 +1,10 @@ //===- llvm/Analysis/ProfileInfo.h - Profile Info Interface -----*- 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 generic ProfileInfo interface, which is used as the @@ -39,7 +39,7 @@ namespace llvm { std::map<std::pair<BasicBlock*, BasicBlock*>, unsigned> EdgeCounts; public: virtual ~ProfileInfo(); // We want to be subclassed - + //===------------------------------------------------------------------===// /// Profile Information Queries /// diff --git a/include/llvm/Analysis/ProfileInfoLoader.h b/include/llvm/Analysis/ProfileInfoLoader.h index 8a8958cc73..6c3c41df2e 100644 --- a/include/llvm/Analysis/ProfileInfoLoader.h +++ b/include/llvm/Analysis/ProfileInfoLoader.h @@ -1,10 +1,10 @@ //===- ProfileInfoLoader.h - Load & convert profile information -*- 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. -// +// //===----------------------------------------------------------------------===// // // The ProfileInfoLoader class is used to load and represent profiling diff --git a/include/llvm/Analysis/ProfileInfoTypes.h b/include/llvm/Analysis/ProfileInfoTypes.h index 0be378c205..c662c3c962 100644 --- a/include/llvm/Analysis/ProfileInfoTypes.h +++ b/include/llvm/Analysis/ProfileInfoTypes.h @@ -4,9 +4,9 @@ |* |* 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 constants shared by the various different profiling |* runtime libraries and the LLVM C++ profile info loader. It must be a |* C header because, at present, the profiling runtimes are written in C. diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h index a3dbb762ac..ba1b5eff88 100644 --- a/include/llvm/Analysis/ScalarEvolution.h +++ b/include/llvm/Analysis/ScalarEvolution.h @@ -1,10 +1,10 @@ //===- llvm/Analysis/ScalarEvolution.h - Scalar Evolution -------*- 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. -// +// //===----------------------------------------------------------------------===// // // The ScalarEvolution class is an LLVM pass which can be used to analyze and @@ -15,7 +15,7 @@ // // This analysis is primarily useful for induction variable substitution and // strength reduction. -// +// //===----------------------------------------------------------------------===// #ifndef LLVM_ANALYSIS_SCALAREVOLUTION_H @@ -89,7 +89,7 @@ namespace llvm { /// the same value, but which uses the concrete value Conc instead of the /// symbolic value. If this SCEV does not use the symbolic value, it /// returns itself. - virtual SCEVHandle + virtual SCEVHandle replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym, const SCEVHandle &Conc) const = 0; @@ -102,7 +102,7 @@ namespace llvm { /// void dump() const; }; - + inline std::ostream &operator<<(std::ostream &OS, const SCEV &S) { S.print(OS); return OS; @@ -121,7 +121,7 @@ namespace llvm { virtual const Type *getType() const; virtual bool hasComputableLoopEvolution(const Loop *L) const; virtual void print(std::ostream &OS) const; - virtual SCEVHandle + virtual SCEVHandle replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym, const SCEVHandle &Conc) const; @@ -141,7 +141,7 @@ namespace llvm { S->addRef(); } SCEVHandle(const SCEVHandle &RHS) : S(RHS.S) { - S->addRef(); + S->addRef(); } ~SCEVHandle() { S->dropRef(); } @@ -190,7 +190,7 @@ namespace llvm { void *Impl; // ScalarEvolution uses the pimpl pattern public: ScalarEvolution() : Impl(0) {} - + /// getSCEV - Return a SCEV expression handle for the full generality of the /// specified expression. SCEVHandle getSCEV(Value *V) const; diff --git a/include/llvm/Analysis/ScalarEvolutionExpressions.h b/include/llvm/Analysis/ScalarEvolutionExpressions.h index b632bc58ee..43244c028a 100644 --- a/include/llvm/Analysis/ScalarEvolutionExpressions.h +++ b/include/llvm/Analysis/ScalarEvolutionExpressions.h @@ -1,14 +1,14 @@ //===- llvm/Analysis/ScalarEvolutionExpressions.h - SCEV Exprs --*- 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 classes used to represent and build scalar expressions. -// +// //===----------------------------------------------------------------------===// #ifndef LLVM_ANALYSIS_SCALAREVOLUTION_EXPRESSIONS_H @@ -33,7 +33,7 @@ namespace llvm { class SCEVConstant : public SCEV { ConstantInt *V; SCEVConstant(ConstantInt *v) : SCEV(scConstant), V(v) {} - + virtual ~SCEVConstant(); public: /// get method - This just gets and returns a new SCEVConstant object. @@ -86,7 +86,7 @@ namespace llvm { const SCEVHandle &getOperand() const { return Op; } virtual const Type *getType() const { return Ty; } - + virtual bool isLoopInvariant(const Loop *L) const { return Op->isLoopInvariant(L); } @@ -132,7 +132,7 @@ namespace llvm { const SCEVHandle &getOperand() const { return Op; } virtual const Type *getType() const { return Ty; } - + virtual bool isLoopInvariant(const Loop *L) const { return Op->isLoopInvariant(L); } diff --git a/include/llvm/Analysis/Trace.h b/include/llvm/Analysis/Trace.h index 7de511f142..32d3629671 100644 --- a/include/llvm/Analysis/Trace.h +++ b/include/llvm/Analysis/Trace.h @@ -22,7 +22,7 @@ #include <vector> #include <cassert> -namespace llvm { +namespace llvm { class BasicBlock; class Function; class Module; diff --git a/include/llvm/Analysis/ValueNumbering.h b/include/llvm/Analysis/ValueNumbering.h index 8190b3fc7a..6169955d94 100644 --- a/include/llvm/Analysis/ValueNumbering.h +++ b/include/llvm/Analysis/ValueNumbering.h @@ -1,10 +1,10 @@ //===- llvm/Analysis/ValueNumbering.h - Value #'ing Interface ---*- 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 abstract ValueNumbering interface, which is used as the diff --git a/include/llvm/Analysis/Verifier.h b/include/llvm/Analysis/Verifier.h index 63ce6ce6c9..82e7580037 100644 --- a/include/llvm/Analysis/Verifier.h +++ b/include/llvm/Analysis/Verifier.h @@ -1,10 +1,10 @@ //===-- llvm/Analysis/Verifier.h - Module Verifier --------------*- 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 function verifier interface, that can be used for some @@ -28,12 +28,12 @@ class Module; class Function; /// @brief An enumeration to specify the action to be taken if errors found. -/// +/// /// This enumeration is used in the functions below to indicate what should /// happen if the verifier finds errors. Each of the functions that uses /// this enumeration as an argument provides a default value for it. The /// actions are listed below. -enum VerifierFailureAction { +enum VerifierFailureAction { AbortProcessAction, ///< verifyModule will print to stderr and abort() ThrowExceptionAction, ///< verifyModule will throw errors as std::string PrintMessageAction, ///< verifyModule will print to stderr and return true @@ -45,15 +45,15 @@ enum VerifierFailureAction { /// Check a module or function for validity. When the pass is used, the /// action indicated by the \p action argument will be used if errors are /// found. -FunctionPass *createVerifierPass( +FunctionPass *createVerifierPass( VerifierFailureAction action = AbortProcessAction ///< Action to take ); -/// @brief Check a module for errors. +/// @brief Check a module for errors. /// -/// If there are no errors, the function returns false. If an error is found, +/// If there are no errors, the function returns false. If an error is found, /// the action taken depends on the \p action parameter. -/// This should only be used for debugging, because it plays games with +/// This should only be used for debugging, because it plays games with /// PassManagers and stuff. bool verifyModule( |