Reformat headers in ADT and Support partially.

Note, I didn't reformat entirely, but partially where I touched in previous commits.

llvm-svn: 244432
This commit is contained in:
NAKAMURA Takumi 2015-08-10 04:22:36 +00:00
parent addd30e2ea
commit 499a56f784
16 changed files with 85 additions and 95 deletions

View File

@ -80,8 +80,8 @@ class df_iterator : public std::iterator<std::forward_iterator_tag,
private:
inline df_iterator(NodeType *Node) {
this->Visited.insert(Node);
VisitStack.push_back(std::make_pair(PointerIntTy(Node, 0),
GT::child_begin(Node)));
VisitStack.push_back(
std::make_pair(PointerIntTy(Node, 0), GT::child_begin(Node)));
}
inline df_iterator() {
// End is when stack is empty
@ -89,8 +89,8 @@ private:
inline df_iterator(NodeType *Node, SetType &S)
: df_iterator_storage<SetType, ExtStorage>(S) {
if (!S.count(Node)) {
VisitStack.push_back(std::make_pair(PointerIntTy(Node, 0),
GT::child_begin(Node)));
VisitStack.push_back(
std::make_pair(PointerIntTy(Node, 0), GT::child_begin(Node)));
this->Visited.insert(Node);
}
}
@ -115,8 +115,8 @@ 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),
GT::child_begin(Next)));
VisitStack.push_back(
std::make_pair(PointerIntTy(Next, 0), GT::child_begin(Next)));
return;
}
}

View File

@ -611,8 +611,7 @@ public:
}
};
template<class T>
class FoldingSetIterator : public FoldingSetIteratorImpl {
template <class T> class FoldingSetIterator : public FoldingSetIteratorImpl {
public:
explicit FoldingSetIterator(void **Bucket) : FoldingSetIteratorImpl(Bucket) {}
@ -717,9 +716,7 @@ 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); }
};
//===----------------------------------------------------------------------===//

View File

@ -98,8 +98,7 @@ public:
const bool Canonicalize;
public:
Factory(bool canonicalize = true)
: Canonicalize(canonicalize) {}
Factory(bool canonicalize = true) : Canonicalize(canonicalize) {}
Factory(BumpPtrAllocator &Alloc, bool canonicalize = true)
: F(Alloc), Canonicalize(canonicalize) {}
@ -142,9 +141,7 @@ public:
return Root;
}
TreeTy *getRootWithoutRetain() const {
return Root;
}
TreeTy *getRootWithoutRetain() const { return Root; }
void manualRetain() {
if (Root) Root->retain();
@ -270,9 +267,10 @@ public:
/// invoking the constructor, but there are cases where make this
/// constructor public is useful.
explicit ImmutableMapRef(const TreeTy *R, FactoryTy *F)
: Root(const_cast<TreeTy*>(R)),
Factory(F) {
if (Root) { Root->retain(); }
: Root(const_cast<TreeTy *>(R)), Factory(F) {
if (Root) {
Root->retain();
}
}
explicit ImmutableMapRef(const ImmutableMap<KeyT, ValT> &X,
@ -282,10 +280,10 @@ public:
if (Root) { Root->retain(); }
}
ImmutableMapRef(const ImmutableMapRef &X)
: Root(X.Root),
Factory(X.Factory) {
if (Root) { Root->retain(); }
ImmutableMapRef(const ImmutableMapRef &X) : Root(X.Root), Factory(X.Factory) {
if (Root) {
Root->retain();
}
}
ImmutableMapRef &operator=(const ImmutableMapRef &X) {
@ -351,7 +349,10 @@ public:
// For testing.
//===--------------------------------------------------===//
void verify() const { if (Root) Root->verify(); }
void verify() const {
if (Root)
Root->verify();
}
//===--------------------------------------------------===//
// Iterators.
@ -396,9 +397,7 @@ public:
ID.AddPointer(M.Root);
}
inline void Profile(FoldingSetNodeID& ID) const {
return Profile(ID, *this);
}
inline void Profile(FoldingSetNodeID &ID) const { return Profile(ID, *this); }
};
} // end namespace llvm

View File

@ -151,8 +151,7 @@ public:
};
// Leave BitNum=0 undefined.
template <typename T>
class PackedVector<T, 0>;
template <typename T> class PackedVector<T, 0>;
} // end llvm namespace

View File

@ -133,7 +133,9 @@ public:
void setFromOpaqueValue(void *Val) { Value = reinterpret_cast<intptr_t>(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

View File

@ -70,8 +70,7 @@ public:
return New;
}
template <typename AllocatorTy>
void Destroy(AllocatorTy &Allocator) {
template <typename AllocatorTy> void Destroy(AllocatorTy &Allocator) {
// Free memory referenced by the item.
this->~ScopedHashTableVal();
Allocator.Deallocate(this);

View File

@ -391,8 +391,7 @@ public:
}
};
template<typename ValueTy>
class StringMapConstIterator {
template <typename ValueTy> class StringMapConstIterator {
protected:
StringMapEntryBase **Ptr;

View File

@ -190,9 +190,7 @@ public:
cleanup->getContext()->registerCleanup(cleanup);
}
~CrashRecoveryContextCleanupRegistrar() {
unregister();
}
~CrashRecoveryContextCleanupRegistrar() { unregister(); }
void unregister() {
if (cleanup && !cleanup->cleanupFired)

View File

@ -96,12 +96,12 @@ enum perms {
// Helper functions so that you can use & and | to manipulate perms bits:
inline perms operator|(perms l, perms r) {
return static_cast<perms>(
static_cast<unsigned short>(l) | static_cast<unsigned short>(r));
return static_cast<perms>(static_cast<unsigned short>(l) |
static_cast<unsigned short>(r));
}
inline perms operator&(perms l, perms r) {
return static_cast<perms>(
static_cast<unsigned short>(l) & static_cast<unsigned short>(r));
return static_cast<perms>(static_cast<unsigned short>(l) &
static_cast<unsigned short>(r));
}
inline perms &operator|=(perms &l, perms r) {
l = l | r;

View File

@ -34,9 +34,7 @@ template<typename T>
class PointerLikeTypeTraits<T*> {
public:
static inline void *getAsVoidPointer(T *P) { return P; }
static inline T *getFromVoidPointer(void *P) {
return static_cast<T*>(P);
}
static inline T *getFromVoidPointer(void *P) { return static_cast<T *>(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

View File

@ -17,8 +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
/// underlying stream if specified with a buffer of zero.