From d1769e33c40185f6df9109a7d59419868f00a5e6 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Mon, 10 Aug 2015 04:22:09 +0000 Subject: [PATCH] Whitespace. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244431 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/APInt.h | 2 +- include/llvm/ADT/APSInt.h | 2 +- include/llvm/ADT/DeltaAlgorithm.h | 2 +- include/llvm/ADT/DenseMapInfo.h | 2 +- include/llvm/ADT/DenseSet.h | 2 +- include/llvm/ADT/DepthFirstIterator.h | 10 ++-- include/llvm/ADT/FoldingSet.h | 4 +- include/llvm/ADT/ImmutableMap.h | 54 +++++++++---------- include/llvm/ADT/PackedVector.h | 10 ++-- include/llvm/ADT/PointerIntPair.h | 10 ++-- include/llvm/ADT/ScopedHashTable.h | 16 +++--- include/llvm/ADT/SetVector.h | 2 +- include/llvm/ADT/SmallPtrSet.h | 4 +- include/llvm/ADT/SmallSet.h | 2 +- include/llvm/ADT/StringMap.h | 2 +- include/llvm/ADT/TinyPtrVector.h | 2 +- include/llvm/Support/CrashRecoveryContext.h | 8 +-- include/llvm/Support/Dwarf.h | 2 +- include/llvm/Support/ErrorHandling.h | 2 +- include/llvm/Support/FileSystem.h | 12 ++--- include/llvm/Support/Format.h | 2 +- .../llvm/Support/GenericDomTreeConstruction.h | 12 ++--- include/llvm/Support/MachO.h | 2 +- include/llvm/Support/MathExtras.h | 2 +- include/llvm/Support/Memory.h | 4 +- include/llvm/Support/Path.h | 4 +- include/llvm/Support/PointerLikeTypeTraits.h | 8 +-- include/llvm/Support/SMLoc.h | 4 +- include/llvm/Support/TargetSelect.h | 24 ++++----- include/llvm/Support/Threading.h | 2 +- include/llvm/Support/Timer.h | 22 ++++---- include/llvm/Support/circular_raw_ostream.h | 2 +- include/llvm/Support/raw_ostream.h | 4 +- 33 files changed, 121 insertions(+), 121 deletions(-) diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h index 5013f295f5c..ea67e7928a7 100644 --- a/include/llvm/ADT/APInt.h +++ b/include/llvm/ADT/APInt.h @@ -1528,7 +1528,7 @@ public: /// \returns the nearest log base 2 of this APInt. Ties round up. /// /// NOTE: When we have a BitWidth of 1, we define: - /// + /// /// log2(0) = UINT32_MAX /// log2(1) = 0 /// diff --git a/include/llvm/ADT/APSInt.h b/include/llvm/ADT/APSInt.h index 83f821b8f15..0e088363c5b 100644 --- a/include/llvm/ADT/APSInt.h +++ b/include/llvm/ADT/APSInt.h @@ -286,7 +286,7 @@ public: } /// \brief Determine if two APSInts have the same value, zero- or - /// sign-extending as needed. + /// sign-extending as needed. static bool isSameValue(const APSInt &I1, const APSInt &I2) { return !compareValues(I1, I2); } diff --git a/include/llvm/ADT/DeltaAlgorithm.h b/include/llvm/ADT/DeltaAlgorithm.h index 21bc1e80c9d..a26f37dfdc7 100644 --- a/include/llvm/ADT/DeltaAlgorithm.h +++ b/include/llvm/ADT/DeltaAlgorithm.h @@ -68,7 +68,7 @@ private: /// \return - True on success. bool Search(const changeset_ty &Changes, const changesetlist_ty &Sets, changeset_ty &Res); - + protected: /// UpdatedSearchState - Callback used when the search state changes. virtual void UpdatedSearchState(const changeset_ty &Changes, diff --git a/include/llvm/ADT/DenseMapInfo.h b/include/llvm/ADT/DenseMapInfo.h index b0a05307207..07f79df0d20 100644 --- a/include/llvm/ADT/DenseMapInfo.h +++ b/include/llvm/ADT/DenseMapInfo.h @@ -58,7 +58,7 @@ template<> struct DenseMapInfo { return LHS == RHS; } }; - + // Provide DenseMapInfo for unsigned ints. template<> struct DenseMapInfo { static inline unsigned getEmptyKey() { return ~0U; } diff --git a/include/llvm/ADT/DenseSet.h b/include/llvm/ADT/DenseSet.h index 198c778c92c..ef09dce3798 100644 --- a/include/llvm/ADT/DenseSet.h +++ b/include/llvm/ADT/DenseSet.h @@ -151,7 +151,7 @@ public: detail::DenseSetEmpty Empty; return TheMap.insert(std::make_pair(V, Empty)); } - + // Range insertion of values. template void insert(InputIt I, InputIt E) { diff --git a/include/llvm/ADT/DepthFirstIterator.h b/include/llvm/ADT/DepthFirstIterator.h index ca147620c57..19e2ff3fe0a 100644 --- a/include/llvm/ADT/DepthFirstIterator.h +++ b/include/llvm/ADT/DepthFirstIterator.h @@ -80,16 +80,16 @@ class df_iterator : public std::iteratorVisited.insert(Node); - VisitStack.push_back(std::make_pair(PointerIntTy(Node, 0), + VisitStack.push_back(std::make_pair(PointerIntTy(Node, 0), GT::child_begin(Node))); } - inline df_iterator() { - // End is when stack is empty + inline df_iterator() { + // End is when stack is empty } inline df_iterator(NodeType *Node, SetType &S) : df_iterator_storage(S) { if (!S.count(Node)) { - VisitStack.push_back(std::make_pair(PointerIntTy(Node, 0), + VisitStack.push_back(std::make_pair(PointerIntTy(Node, 0), GT::child_begin(Node))); this->Visited.insert(Node); } @@ -115,7 +115,7 @@ private: // Has our next sibling been visited? if (Next && this->Visited.insert(Next).second) { // No, do it now. - VisitStack.push_back(std::make_pair(PointerIntTy(Next, 0), + VisitStack.push_back(std::make_pair(PointerIntTy(Next, 0), GT::child_begin(Next))); return; } diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h index 99d83d2622a..e61580dc349 100644 --- a/include/llvm/ADT/FoldingSet.h +++ b/include/llvm/ADT/FoldingSet.h @@ -717,8 +717,8 @@ protected: explicit FastFoldingSetNode(const FoldingSetNodeID &ID) : FastID(ID) {} public: - void Profile(FoldingSetNodeID &ID) const { - ID.AddNodeID(FastID); + void Profile(FoldingSetNodeID &ID) const { + ID.AddNodeID(FastID); } }; diff --git a/include/llvm/ADT/ImmutableMap.h b/include/llvm/ADT/ImmutableMap.h index 1aa3d334163..c8221a8203f 100644 --- a/include/llvm/ADT/ImmutableMap.h +++ b/include/llvm/ADT/ImmutableMap.h @@ -100,7 +100,7 @@ public: public: Factory(bool canonicalize = true) : Canonicalize(canonicalize) {} - + Factory(BumpPtrAllocator& Alloc, bool canonicalize = true) : F(Alloc), Canonicalize(canonicalize) {} @@ -145,11 +145,11 @@ public: TreeTy *getRootWithoutRetain() const { return Root; } - + void manualRetain() { if (Root) Root->retain(); } - + void manualRelease() { if (Root) Root->release(); } @@ -223,7 +223,7 @@ public: return nullptr; } - + /// getMaxElement - Returns the pair in the ImmutableMap for /// which key is the highest in the ordering of keys in the map. This /// method returns NULL if the map is empty. @@ -259,17 +259,17 @@ public: typedef typename ValInfo::data_type_ref data_type_ref; typedef ImutAVLTree TreeTy; typedef typename TreeTy::Factory FactoryTy; - + protected: TreeTy *Root; FactoryTy *Factory; - + public: /// Constructs a map from a pointer to a tree root. In general one /// should use a Factory object to create maps instead of directly /// invoking the constructor, but there are cases where make this /// constructor public is useful. - explicit ImmutableMapRef(const TreeTy* R, FactoryTy *F) + explicit ImmutableMapRef(const TreeTy* R, FactoryTy *F) : Root(const_cast(R)), Factory(F) { if (Root) { Root->retain(); } @@ -281,7 +281,7 @@ public: Factory(F.getTreeFactory()) { if (Root) { Root->retain(); } } - + ImmutableMapRef(const ImmutableMapRef &X) : Root(X.Root), Factory(X.Factory) { @@ -292,10 +292,10 @@ public: if (Root != X.Root) { if (X.Root) X.Root->retain(); - + if (Root) Root->release(); - + Root = X.Root; Factory = X.Factory; } @@ -306,7 +306,7 @@ public: if (Root) Root->release(); } - + static inline ImmutableMapRef getEmptyMap(FactoryTy *F) { return ImmutableMapRef(0, F); } @@ -328,31 +328,31 @@ public: TreeTy *NewT = Factory->remove(Root, K); return ImmutableMapRef(NewT, Factory); } - + bool contains(key_type_ref K) const { return Root ? Root->contains(K) : false; } - + ImmutableMap asImmutableMap() const { return ImmutableMap(Factory->getCanonicalTree(Root)); } - + bool operator==(const ImmutableMapRef &RHS) const { return Root && RHS.Root ? Root->isEqual(*RHS.Root) : Root == RHS.Root; } - + bool operator!=(const ImmutableMapRef &RHS) const { return Root && RHS.Root ? Root->isNotEqual(*RHS.Root) : Root != RHS.Root; } - + bool isEmpty() const { return !Root; } - + //===--------------------------------------------------===// // For testing. //===--------------------------------------------------===// - + void verify() const { if (Root) Root->verify(); } - + //===--------------------------------------------------===// // Iterators. //===--------------------------------------------------===// @@ -369,38 +369,38 @@ public: iterator begin() const { return iterator(Root); } iterator end() const { return iterator(); } - + data_type* lookup(key_type_ref K) const { if (Root) { TreeTy* T = Root->find(K); if (T) return &T->getValue().second; } - + return 0; } - + /// getMaxElement - Returns the pair in the ImmutableMap for /// which key is the highest in the ordering of keys in the map. This /// method returns NULL if the map is empty. value_type* getMaxElement() const { return Root ? &(Root->getMaxElement()->getValue()) : 0; } - + //===--------------------------------------------------===// // Utility methods. //===--------------------------------------------------===// - + unsigned getHeight() const { return Root ? Root->getHeight() : 0; } - + static inline void Profile(FoldingSetNodeID& ID, const ImmutableMapRef &M) { ID.AddPointer(M.Root); } - + inline void Profile(FoldingSetNodeID& ID) const { return Profile(ID, *this); } }; - + } // end namespace llvm #endif diff --git a/include/llvm/ADT/PackedVector.h b/include/llvm/ADT/PackedVector.h index 1ae2a77e7ea..7345d82a248 100644 --- a/include/llvm/ADT/PackedVector.h +++ b/include/llvm/ADT/PackedVector.h @@ -83,9 +83,9 @@ public: PackedVector &Vec; const unsigned Idx; - reference(); // Undefined + reference(); // Undefined public: - reference(PackedVector &vec, unsigned idx) : Vec(vec), Idx(idx) { } + reference(PackedVector &vec, unsigned idx) : Vec(vec), Idx(idx) { } reference &operator=(T val) { Vec.setValue(Vec.Bits, Idx, val); @@ -102,9 +102,9 @@ public: bool empty() const { return Bits.empty(); } unsigned size() const { return Bits.size() >> (BitNum-1); } - + void clear() { Bits.clear(); } - + void resize(unsigned N) { Bits.resize(N << (BitNum-1)); } void reserve(unsigned N) { Bits.reserve(N << (BitNum-1)); } @@ -150,7 +150,7 @@ public: } }; -// Leave BitNum=0 undefined. +// Leave BitNum=0 undefined. template class PackedVector; diff --git a/include/llvm/ADT/PointerIntPair.h b/include/llvm/ADT/PointerIntPair.h index d5915bcd89d..b7238641b2e 100644 --- a/include/llvm/ADT/PointerIntPair.h +++ b/include/llvm/ADT/PointerIntPair.h @@ -55,10 +55,10 @@ class PointerIntPair { /// IntShift - The number of low bits that we reserve for other uses, and /// keep zero. IntShift = (uintptr_t)PtrTraits::NumLowBitsAvailable-IntBits, - + /// IntMask - This is the unshifted mask for valid bits of the int type. IntMask = (uintptr_t)(((intptr_t)1 << IntBits)-1), - + // ShiftedIntMask - This is the bits for the integer shifted in place. ShiftedIntMask = (uintptr_t)(IntMask << IntShift) }; @@ -93,7 +93,7 @@ public: void setInt(IntType IntVal) { intptr_t IntWord = static_cast(IntVal); assert((IntWord & ~IntMask) == 0 && "Integer too large for field"); - + // Preserve all bits other than the ones we are updating. Value &= ~ShiftedIntMask; // Remove integer field. Value |= IntWord << IntShift; // Set new integer. @@ -133,7 +133,7 @@ public: void setFromOpaqueValue(void *Val) { Value = reinterpret_cast(Val);} static PointerIntPair getFromOpaqueValue(void *V) { - PointerIntPair P; P.setFromOpaqueValue(V); return P; + PointerIntPair P; P.setFromOpaqueValue(V); return P; } // Allow PointerIntPairs to be created from const void * if and only if the @@ -156,7 +156,7 @@ template struct isPodLike > { static const bool value = true; }; - + // Provide specialization of DenseMapInfo for PointerIntPair. template struct DenseMapInfo > { diff --git a/include/llvm/ADT/ScopedHashTable.h b/include/llvm/ADT/ScopedHashTable.h index 8ad2d097e78..5bcc56e45e1 100644 --- a/include/llvm/ADT/ScopedHashTable.h +++ b/include/llvm/ADT/ScopedHashTable.h @@ -56,7 +56,7 @@ public: ScopedHashTableVal *getNextForKey() { return NextForKey; } const ScopedHashTableVal *getNextForKey() const { return NextForKey; } ScopedHashTableVal *getNextInScope() { return NextInScope; } - + template static ScopedHashTableVal *Create(ScopedHashTableVal *nextInScope, ScopedHashTableVal *nextForKey, @@ -66,10 +66,10 @@ public: // Set up the value. new (New) ScopedHashTableVal(key, val); New->NextInScope = nextInScope; - New->NextForKey = nextForKey; + New->NextForKey = nextForKey; return New; } - + template void Destroy(AllocatorTy &Allocator) { // Free memory referenced by the item. @@ -99,7 +99,7 @@ public: ScopedHashTableScope *getParentScope() { return PrevScope; } const ScopedHashTableScope *getParentScope() const { return PrevScope; } - + private: friend class ScopedHashTable; ScopedHashTableVal *getLastValInScope() { @@ -154,9 +154,9 @@ private: typedef ScopedHashTableVal ValTy; DenseMap TopLevelMap; ScopeTy *CurScope; - + AllocatorTy Allocator; - + ScopedHashTable(const ScopedHashTable&); // NOT YET IMPLEMENTED void operator=(const ScopedHashTable&); // NOT YET IMPLEMENTED friend class ScopedHashTableScope; @@ -181,7 +181,7 @@ public: typename DenseMap::iterator I = TopLevelMap.find(Key); if (I != TopLevelMap.end()) return I->second->getValue(); - + return V(); } @@ -199,7 +199,7 @@ public: if (I == TopLevelMap.end()) return end(); return iterator(I->second); } - + ScopeTy *getCurScope() { return CurScope; } const ScopeTy *getCurScope() const { return CurScope; } diff --git a/include/llvm/ADT/SetVector.h b/include/llvm/ADT/SetVector.h index 20fd91ff05f..ad0a0dfac63 100644 --- a/include/llvm/ADT/SetVector.h +++ b/include/llvm/ADT/SetVector.h @@ -190,7 +190,7 @@ public: set_.erase(back()); vector_.pop_back(); } - + T LLVM_ATTRIBUTE_UNUSED_RESULT pop_back_val() { T Ret = back(); pop_back(); diff --git a/include/llvm/ADT/SmallPtrSet.h b/include/llvm/ADT/SmallPtrSet.h index a68bfaeff5b..29be3ed3ba1 100644 --- a/include/llvm/ADT/SmallPtrSet.h +++ b/include/llvm/ADT/SmallPtrSet.h @@ -181,14 +181,14 @@ protected: template class SmallPtrSetIterator : public SmallPtrSetIteratorImpl { typedef PointerLikeTypeTraits PtrTraits; - + public: typedef PtrTy value_type; typedef PtrTy reference; typedef PtrTy pointer; typedef std::ptrdiff_t difference_type; typedef std::forward_iterator_tag iterator_category; - + explicit SmallPtrSetIterator(const void *const *BP, const void *const *E) : SmallPtrSetIteratorImpl(BP, E) {} diff --git a/include/llvm/ADT/SmallSet.h b/include/llvm/ADT/SmallSet.h index 9ee4be713e5..39a57b87b2a 100644 --- a/include/llvm/ADT/SmallSet.h +++ b/include/llvm/ADT/SmallSet.h @@ -93,7 +93,7 @@ public: for (; I != E; ++I) insert(*I); } - + bool erase(const T &V) { if (!isSmall()) return Set.erase(V); diff --git a/include/llvm/ADT/StringMap.h b/include/llvm/ADT/StringMap.h index 3b34360b07b..c6d610c56ff 100644 --- a/include/llvm/ADT/StringMap.h +++ b/include/llvm/ADT/StringMap.h @@ -220,7 +220,7 @@ class StringMap : public StringMapImpl { public: typedef StringMapEntry MapEntryTy; - + StringMap() : StringMapImpl(static_cast(sizeof(MapEntryTy))) {} explicit StringMap(unsigned InitialSize) : StringMapImpl(InitialSize, static_cast(sizeof(MapEntryTy))) {} diff --git a/include/llvm/ADT/TinyPtrVector.h b/include/llvm/ADT/TinyPtrVector.h index f7d69876d56..487aa46cf64 100644 --- a/include/llvm/ADT/TinyPtrVector.h +++ b/include/llvm/ADT/TinyPtrVector.h @@ -15,7 +15,7 @@ #include "llvm/ADT/SmallVector.h" namespace llvm { - + /// TinyPtrVector - This class is specialized for cases where there are /// normally 0 or 1 element in a vector, but is general enough to go beyond that /// when required. diff --git a/include/llvm/Support/CrashRecoveryContext.h b/include/llvm/Support/CrashRecoveryContext.h index ea29de50a9a..ec965cbd896 100644 --- a/include/llvm/Support/CrashRecoveryContext.h +++ b/include/llvm/Support/CrashRecoveryContext.h @@ -111,7 +111,7 @@ protected: public: bool cleanupFired; - + virtual ~CrashRecoveryContextCleanup(); virtual void recoverResources() = 0; @@ -146,7 +146,7 @@ class CrashRecoveryContextDestructorCleanup : public CrashRecoveryContextCleanupBase, T> { public: CrashRecoveryContextDestructorCleanup(CrashRecoveryContext *context, - T *resource) + T *resource) : CrashRecoveryContextCleanupBase< CrashRecoveryContextDestructorCleanup, T>(context, resource) {} @@ -171,7 +171,7 @@ class CrashRecoveryContextReleaseRefCleanup : public CrashRecoveryContextCleanupBase, T> { public: - CrashRecoveryContextReleaseRefCleanup(CrashRecoveryContext *context, + CrashRecoveryContextReleaseRefCleanup(CrashRecoveryContext *context, T *resource) : CrashRecoveryContextCleanupBase, T>(context, resource) {} @@ -193,7 +193,7 @@ public: ~CrashRecoveryContextCleanupRegistrar() { unregister(); } - + void unregister() { if (cleanup && !cleanup->cleanupFired) cleanup->getContext()->unregisterCleanup(cleanup); diff --git a/include/llvm/Support/Dwarf.h b/include/llvm/Support/Dwarf.h index 28d0cee1d48..c3312fc80c5 100644 --- a/include/llvm/Support/Dwarf.h +++ b/include/llvm/Support/Dwarf.h @@ -610,7 +610,7 @@ unsigned getAttributeEncoding(StringRef EncodingString); const char *AttributeValueString(uint16_t Attr, unsigned Val); /// \brief Decsribes an entry of the various gnu_pub* debug sections. -/// +/// /// The gnu_pub* kind looks like: /// /// 0-3 reserved diff --git a/include/llvm/Support/ErrorHandling.h b/include/llvm/Support/ErrorHandling.h index 9afd52d1abc..fc0997eb6cf 100644 --- a/include/llvm/Support/ErrorHandling.h +++ b/include/llvm/Support/ErrorHandling.h @@ -67,7 +67,7 @@ namespace llvm { /// /// If no error handler is installed the default is to print the message to /// standard error, followed by a newline. - /// After the error handler is called this function will call exit(1), it + /// After the error handler is called this function will call exit(1), it /// does not return. LLVM_ATTRIBUTE_NORETURN void report_fatal_error(const char *reason, bool gen_crash_diag = true); diff --git a/include/llvm/Support/FileSystem.h b/include/llvm/Support/FileSystem.h index a41bec921e0..2296c6d6a1e 100644 --- a/include/llvm/Support/FileSystem.h +++ b/include/llvm/Support/FileSystem.h @@ -97,19 +97,19 @@ enum perms { // Helper functions so that you can use & and | to manipulate perms bits: inline perms operator|(perms l , perms r) { return static_cast( - static_cast(l) | static_cast(r)); + static_cast(l) | static_cast(r)); } inline perms operator&(perms l , perms r) { return static_cast( - static_cast(l) & static_cast(r)); + static_cast(l) & static_cast(r)); } inline perms &operator|=(perms &l, perms r) { - l = l | r; - return l; + l = l | r; + return l; } inline perms &operator&=(perms &l, perms r) { - l = l & r; - return l; + l = l & r; + return l; } inline perms operator~(perms x) { return static_cast(~static_cast(x)); diff --git a/include/llvm/Support/Format.h b/include/llvm/Support/Format.h index b4233eed28b..f0b437a0cbe 100644 --- a/include/llvm/Support/Format.h +++ b/include/llvm/Support/Format.h @@ -180,7 +180,7 @@ inline FormattedNumber format_hex_no_prefix(uint64_t N, unsigned Width, return FormattedNumber(N, 0, Width, true, Upper, false); } -/// format_decimal - Output \p N as a right justified, fixed-width decimal. If +/// format_decimal - Output \p N as a right justified, fixed-width decimal. If /// number will not fit in width, full number is still printed. Examples: /// OS << format_decimal(0, 5) => " 0" /// OS << format_decimal(255, 5) => " 255" diff --git a/include/llvm/Support/GenericDomTreeConstruction.h b/include/llvm/Support/GenericDomTreeConstruction.h index 55e931307f6..ccf5d8816c7 100644 --- a/include/llvm/Support/GenericDomTreeConstruction.h +++ b/include/llvm/Support/GenericDomTreeConstruction.h @@ -87,7 +87,7 @@ unsigned DFSPass(DominatorTreeBase& DT, // Increment the successor number for the next time we get to it. ++Worklist.back().second; - + // Visit the successor next, if it isn't already visited. typename GraphT::NodeType* Succ = *NextSucc; @@ -103,7 +103,7 @@ unsigned DFSPass(DominatorTreeBase& DT, } template -typename GraphT::NodeType* +typename GraphT::NodeType* Eval(DominatorTreeBase& DT, typename GraphT::NodeType *VIn, unsigned LastLinked) { typename DominatorTreeBase::InfoRec &VInInfo = @@ -116,7 +116,7 @@ Eval(DominatorTreeBase& DT, if (VInInfo.Parent >= LastLinked) Work.push_back(VIn); - + while (!Work.empty()) { typename GraphT::NodeType* V = Work.back(); typename DominatorTreeBase::InfoRec &VInfo = @@ -127,8 +127,8 @@ Eval(DominatorTreeBase& DT, if (Visited.insert(VAncestor).second && VInfo.Parent >= LastLinked) { Work.push_back(VAncestor); continue; - } - Work.pop_back(); + } + Work.pop_back(); // Update VInfo based on Ancestor info if (VInfo.Parent < LastLinked) @@ -168,7 +168,7 @@ void Calculate(DominatorTreeBase::NodeType>& DT, i != e; ++i) N = DFSPass(DT, DT.Roots[i], N); - // it might be that some blocks did not get a DFS number (e.g., blocks of + // it might be that some blocks did not get a DFS number (e.g., blocks of // infinite loops). In these cases an artificial exit node is required. MultipleRoots |= (DT.isPostDominator() && N != GraphTraits::size(&F)); diff --git a/include/llvm/Support/MachO.h b/include/llvm/Support/MachO.h index ee0851a695f..0428198cce6 100644 --- a/include/llvm/Support/MachO.h +++ b/include/llvm/Support/MachO.h @@ -383,7 +383,7 @@ namespace llvm { SELF_LIBRARY_ORDINAL = 0x0, MAX_LIBRARY_ORDINAL = 0xfd, DYNAMIC_LOOKUP_ORDINAL = 0xfe, - EXECUTABLE_ORDINAL = 0xff + EXECUTABLE_ORDINAL = 0xff }; enum StabType { diff --git a/include/llvm/Support/MathExtras.h b/include/llvm/Support/MathExtras.h index 2cf7e0e5d0b..df18b6fcfca 100644 --- a/include/llvm/Support/MathExtras.h +++ b/include/llvm/Support/MathExtras.h @@ -552,7 +552,7 @@ inline uint32_t FloatToBits(float Float) { inline uint64_t MinAlign(uint64_t A, uint64_t B) { // The largest power of 2 that divides both A and B. // - // Replace "-Value" by "1+~Value" in the following commented code to avoid + // Replace "-Value" by "1+~Value" in the following commented code to avoid // MSVC warning C4146 // return (A | B) & -(A | B); return (A | B) & (1 + ~(A | B)); diff --git a/include/llvm/Support/Memory.h b/include/llvm/Support/Memory.h index 8527a4a7dd7..47fd327e2e2 100644 --- a/include/llvm/Support/Memory.h +++ b/include/llvm/Support/Memory.h @@ -71,7 +71,7 @@ namespace sys { /// If the address following \p NearBlock is not so aligned, it will be /// rounded up to the next allocation granularity boundary. /// - /// \r a non-null MemoryBlock if the function was successful, + /// \r a non-null MemoryBlock if the function was successful, /// otherwise a null MemoryBlock is with \p EC describing the error. /// /// @brief Allocate mapped memory. @@ -87,7 +87,7 @@ namespace sys { /// /// \r error_success if the function was successful, or an error_code /// describing the failure if an error occurred. - /// + /// /// @brief Release mapped memory. static std::error_code releaseMappedMemory(MemoryBlock &Block); diff --git a/include/llvm/Support/Path.h b/include/llvm/Support/Path.h index f7dd1fc1208..6fedb93d237 100644 --- a/include/llvm/Support/Path.h +++ b/include/llvm/Support/Path.h @@ -216,7 +216,7 @@ StringRef root_name(StringRef path); /// @result The root directory of \a path if it has one, otherwise /// "". StringRef root_directory(StringRef path); - + /// @brief Get root path. /// /// Equivalent to root_name + root_directory. @@ -308,7 +308,7 @@ bool is_separator(char value); /// @result StringRef of the preferred separator, null-terminated. StringRef get_separator(); -/// @brief Get the typical temporary directory for the system, e.g., +/// @brief Get the typical temporary directory for the system, e.g., /// "/var/tmp" or "C:/TEMP" /// /// @param erasedOnReboot Whether to favor a path that is erased on reboot diff --git a/include/llvm/Support/PointerLikeTypeTraits.h b/include/llvm/Support/PointerLikeTypeTraits.h index 83708213921..6b884583622 100644 --- a/include/llvm/Support/PointerLikeTypeTraits.h +++ b/include/llvm/Support/PointerLikeTypeTraits.h @@ -18,7 +18,7 @@ #include "llvm/Support/DataTypes.h" namespace llvm { - + /// PointerLikeTypeTraits - This is a traits object that is used to handle /// pointer types and things that are just wrappers for pointers as a uniform /// entity. @@ -37,7 +37,7 @@ public: static inline T *getFromVoidPointer(void *P) { return static_cast(P); } - + /// Note, we assume here that malloc returns objects at least 4-byte aligned. /// However, this may be wrong, or pointers may be from something other than /// malloc. In this case, you should specialize this template to reduce this. @@ -46,7 +46,7 @@ public: /// this is actually true. enum { NumLowBitsAvailable = 2 }; }; - + // Provide PointerLikeTypeTraits for const pointers. template class PointerLikeTypeTraits { @@ -75,7 +75,7 @@ public: // No bits are available! enum { NumLowBitsAvailable = 0 }; }; - + } // end namespace llvm #endif diff --git a/include/llvm/Support/SMLoc.h b/include/llvm/Support/SMLoc.h index 45ec92d2d0d..c6e9a14e82a 100644 --- a/include/llvm/Support/SMLoc.h +++ b/include/llvm/Support/SMLoc.h @@ -54,10 +54,10 @@ public: assert(Start.isValid() == End.isValid() && "Start and end should either both be valid or both be invalid!"); } - + bool isValid() const { return Start.isValid(); } }; - + } // end namespace llvm #endif diff --git a/include/llvm/Support/TargetSelect.h b/include/llvm/Support/TargetSelect.h index 1d94544508a..582785cb69a 100644 --- a/include/llvm/Support/TargetSelect.h +++ b/include/llvm/Support/TargetSelect.h @@ -25,11 +25,11 @@ extern "C" { #define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##Target(); #include "llvm/Config/Targets.def" - + // Declare all of the target-MC-initialization functions that are available. #define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##TargetMC(); #include "llvm/Config/Targets.def" - + // Declare all of the available assembly printer initialization functions. #define LLVM_ASM_PRINTER(TargetName) void LLVMInitialize##TargetName##AsmPrinter(); #include "llvm/Config/AsmPrinters.def" @@ -54,7 +54,7 @@ namespace llvm { #define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetInfo(); #include "llvm/Config/Targets.def" } - + /// InitializeAllTargets - The main program should call this function if it /// wants access to all available target machines that LLVM is configured to /// support, to make them available via the TargetRegistry. @@ -67,7 +67,7 @@ namespace llvm { #define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##Target(); #include "llvm/Config/Targets.def" } - + /// InitializeAllTargetMCs - The main program should call this function if it /// wants access to all available target MC that LLVM is configured to /// support, to make them available via the TargetRegistry. @@ -77,7 +77,7 @@ namespace llvm { #define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetMC(); #include "llvm/Config/Targets.def" } - + /// InitializeAllAsmPrinters - The main program should call this function if /// it wants all asm printers that LLVM is configured to support, to make them /// available via the TargetRegistry. @@ -87,7 +87,7 @@ namespace llvm { #define LLVM_ASM_PRINTER(TargetName) LLVMInitialize##TargetName##AsmPrinter(); #include "llvm/Config/AsmPrinters.def" } - + /// InitializeAllAsmParsers - The main program should call this function if it /// wants all asm parsers that LLVM is configured to support, to make them /// available via the TargetRegistry. @@ -97,7 +97,7 @@ namespace llvm { #define LLVM_ASM_PARSER(TargetName) LLVMInitialize##TargetName##AsmParser(); #include "llvm/Config/AsmParsers.def" } - + /// InitializeAllDisassemblers - The main program should call this function if /// it wants all disassemblers that LLVM is configured to support, to make /// them available via the TargetRegistry. @@ -107,9 +107,9 @@ namespace llvm { #define LLVM_DISASSEMBLER(TargetName) LLVMInitialize##TargetName##Disassembler(); #include "llvm/Config/Disassemblers.def" } - + /// InitializeNativeTarget - The main program should call this function to - /// initialize the native target corresponding to the host. This is useful + /// initialize the native target corresponding to the host. This is useful /// for JIT applications to ensure that the target gets linked in correctly. /// /// It is legal for a client to make multiple calls to this function. @@ -123,7 +123,7 @@ namespace llvm { #else return true; #endif - } + } /// InitializeNativeTargetAsmPrinter - The main program should call /// this function to initialize the native target asm printer. @@ -135,7 +135,7 @@ namespace llvm { #else return true; #endif - } + } /// InitializeNativeTargetAsmParser - The main program should call /// this function to initialize the native target asm parser. @@ -147,7 +147,7 @@ namespace llvm { #else return true; #endif - } + } /// InitializeNativeTargetDisassembler - The main program should call /// this function to initialize the native target disassembler. diff --git a/include/llvm/Support/Threading.h b/include/llvm/Support/Threading.h index 3cca1d6a991..9007c132a99 100644 --- a/include/llvm/Support/Threading.h +++ b/include/llvm/Support/Threading.h @@ -21,7 +21,7 @@ namespace llvm { bool llvm_is_multithreaded(); /// llvm_execute_on_thread - Execute the given \p UserFn on a separate - /// thread, passing it the provided \p UserData and waits for thread + /// thread, passing it the provided \p UserData and waits for thread /// completion. /// /// This function does not guarantee that the code will actually be executed diff --git a/include/llvm/Support/Timer.h b/include/llvm/Support/Timer.h index a3646fc7423..b4bf9543b0a 100644 --- a/include/llvm/Support/Timer.h +++ b/include/llvm/Support/Timer.h @@ -30,13 +30,13 @@ class TimeRecord { ssize_t MemUsed; // Memory allocated (in bytes) public: TimeRecord() : WallTime(0), UserTime(0), SystemTime(0), MemUsed(0) {} - + /// getCurrentTime - Get the current time and memory usage. If Start is true /// we get the memory usage before the time, otherwise we get time before /// memory usage. This matters if the time to get the memory usage is /// significant and shouldn't be counted as part of a duration. static TimeRecord getCurrentTime(bool Start = true); - + double getProcessTime() const { return UserTime+SystemTime; } double getUserTime() const { return UserTime; } double getSystemTime() const { return SystemTime; } @@ -48,7 +48,7 @@ public: // Sort by Wall Time elapsed, as it is the only thing really accurate return WallTime < T.WallTime; } - + void operator+=(const TimeRecord &RHS) { WallTime += RHS.WallTime; UserTime += RHS.UserTime; @@ -61,12 +61,12 @@ public: SystemTime -= RHS.SystemTime; MemUsed -= RHS.MemUsed; } - + /// print - Print the current timer to standard error, and reset the "Started" /// flag. void print(const TimeRecord &Total, raw_ostream &OS) const; }; - + /// Timer - This class is used to track the amount of time spent between /// invocations of its startTimer()/stopTimer() methods. Given appropriate OS /// support it can also keep track of the RSS of the program at various points. @@ -80,7 +80,7 @@ class Timer { std::string Name; // The name of this time variable. bool Started; // Has this time variable ever been started? TimerGroup *TG; // The TimerGroup this Timer is in. - + Timer **Prev, *Next; // Doubly linked list of timers in the group. public: explicit Timer(StringRef N) : TG(nullptr) { init(N); } @@ -98,10 +98,10 @@ public: explicit Timer() : TG(nullptr) {} void init(StringRef N); void init(StringRef N, TimerGroup &tg); - + const std::string &getName() const { return Name; } bool isInitialized() const { return TG != nullptr; } - + /// startTimer - Start the timer running. Time between calls to /// startTimer/stopTimer is counted by the Timer class. Note that these calls /// must be correctly paired. @@ -158,7 +158,7 @@ class TimerGroup { std::string Name; Timer *FirstTimer; // First timer in the group. std::vector > TimersToPrint; - + TimerGroup **Prev, *Next; // Doubly linked list of TimerGroup's. TimerGroup(const TimerGroup &TG) = delete; void operator=(const TimerGroup &TG) = delete; @@ -171,10 +171,10 @@ public: /// print - Print any started timers in this group and zero them. void print(raw_ostream &OS); - + /// printAll - This static method prints all timers and clears them all out. static void printAll(raw_ostream &OS); - + private: friend class Timer; void addTimer(Timer &T); diff --git a/include/llvm/Support/circular_raw_ostream.h b/include/llvm/Support/circular_raw_ostream.h index ddaa9acbf68..13900d0e968 100644 --- a/include/llvm/Support/circular_raw_ostream.h +++ b/include/llvm/Support/circular_raw_ostream.h @@ -17,7 +17,7 @@ #include "llvm/Support/raw_ostream.h" -namespace llvm +namespace llvm { /// circular_raw_ostream - A raw_ostream which *can* save its data /// to a circular buffer, or can pass it through directly to an diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h index 75857a2027a..c12f90142ab 100644 --- a/include/llvm/Support/raw_ostream.h +++ b/include/llvm/Support/raw_ostream.h @@ -218,10 +218,10 @@ public: // Formatted output, see the leftJustify() function in Support/Format.h. raw_ostream &operator<<(const FormattedString &); - + // Formatted output, see the formatHex() function in Support/Format.h. raw_ostream &operator<<(const FormattedNumber &); - + /// indent - Insert 'NumSpaces' spaces. raw_ostream &indent(unsigned NumSpaces); -- 2.34.1