// Teach SmallPtrSet that CanQual<T> is "basically a pointer".
template<typename T>
-class PointerLikeTypeTraits<clang::CanQual<T> > {
-public:
+struct PointerLikeTypeTraits<clang::CanQual<T> > {
static inline void *getAsVoidPointer(clang::CanQual<T> P) {
return P.getAsOpaquePtr();
}
namespace llvm {
// Provide PointerLikeTypeTraits for non-cvr pointers.
template<>
- class PointerLikeTypeTraits< ::clang::AnyFunctionDecl> {
- public:
+ struct PointerLikeTypeTraits< ::clang::AnyFunctionDecl> {
static inline void *getAsVoidPointer(::clang::AnyFunctionDecl F) {
return F.get();
}
namespace llvm {
// DeclGroupRef is "like a pointer", implement PointerLikeTypeTraits.
template <typename T>
- class PointerLikeTypeTraits;
+ struct PointerLikeTypeTraits;
template <>
- class PointerLikeTypeTraits<clang::DeclGroupRef> {
- public:
+ struct PointerLikeTypeTraits<clang::DeclGroupRef> {
static inline void *getAsVoidPointer(clang::DeclGroupRef P) {
return P.getAsOpaquePtr();
}
/// \brief The clang::TemplateName class is effectively a pointer.
template<>
-class PointerLikeTypeTraits<clang::TemplateName> {
-public:
+struct PointerLikeTypeTraits<clang::TemplateName> {
static inline void *getAsVoidPointer(clang::TemplateName TN) {
return TN.getAsVoidPointer();
}
namespace llvm {
template <typename T>
- class PointerLikeTypeTraits;
+ struct PointerLikeTypeTraits;
template<>
- class PointerLikeTypeTraits< ::clang::Type*> {
- public:
+ struct PointerLikeTypeTraits< ::clang::Type*> {
static inline void *getAsVoidPointer(::clang::Type *P) { return P; }
static inline ::clang::Type *getFromVoidPointer(void *P) {
return static_cast< ::clang::Type*>(P);
enum { NumLowBitsAvailable = clang::TypeAlignmentInBits };
};
template<>
- class PointerLikeTypeTraits< ::clang::ExtQuals*> {
- public:
+ struct PointerLikeTypeTraits< ::clang::ExtQuals*> {
static inline void *getAsVoidPointer(::clang::ExtQuals *P) { return P; }
static inline ::clang::ExtQuals *getFromVoidPointer(void *P) {
return static_cast< ::clang::ExtQuals*>(P);
// Teach SmallPtrSet that QualType is "basically a pointer".
template<>
-class PointerLikeTypeTraits<clang::QualType> {
-public:
+struct PointerLikeTypeTraits<clang::QualType> {
static inline void *getAsVoidPointer(clang::QualType P) {
return P.getAsOpaquePtr();
}
template <>
struct isPodLike<clang::Selector> { static const bool value = true; };
-template <typename T> class PointerLikeTypeTraits;
+template <typename T> struct PointerLikeTypeTraits;
template<>
-class PointerLikeTypeTraits<clang::Selector> {
-public:
+struct PointerLikeTypeTraits<clang::Selector> {
static inline const void *getAsVoidPointer(clang::Selector P) {
return P.getAsOpaquePtr();
}
// Provide PointerLikeTypeTraits for IdentifierInfo pointers, which
// are not guaranteed to be 8-byte aligned.
template<>
-class PointerLikeTypeTraits<clang::IdentifierInfo*> {
-public:
+struct PointerLikeTypeTraits<clang::IdentifierInfo*> {
static inline void *getAsVoidPointer(clang::IdentifierInfo* P) {
return P;
}
};
template<>
-class PointerLikeTypeTraits<const clang::IdentifierInfo*> {
-public:
+struct PointerLikeTypeTraits<const clang::IdentifierInfo*> {
static inline const void *getAsVoidPointer(const clang::IdentifierInfo* P) {
return P;
}
// Teach SmallPtrSet how to handle SourceLocation.
template<>
- class PointerLikeTypeTraits<clang::SourceLocation> {
- public:
+ struct PointerLikeTypeTraits<clang::SourceLocation> {
static inline void *getAsVoidPointer(clang::SourceLocation L) {
return L.getPtrEncoding();
}
}
namespace llvm {
template <>
-class PointerLikeTypeTraits< ::clang::CodeGen::ConstantInitBuilderBase*> {
-public:
+struct PointerLikeTypeTraits< ::clang::CodeGen::ConstantInitBuilderBase*> {
using T = ::clang::CodeGen::ConstantInitBuilderBase*;
static inline void *getAsVoidPointer(T p) { return p; }
namespace llvm {
template <>
-class PointerLikeTypeTraits< ::clang::CodeGen::ConstantInitFuture> {
-public:
+struct PointerLikeTypeTraits< ::clang::CodeGen::ConstantInitFuture> {
using T = ::clang::CodeGen::ConstantInitFuture;
static inline void *getAsVoidPointer(T future) {
namespace llvm {
template <class T>
- class PointerLikeTypeTraits<clang::OpaquePtr<T> > {
- public:
+ struct PointerLikeTypeTraits<clang::OpaquePtr<T> > {
static inline void *getAsVoidPointer(clang::OpaquePtr<T> P) {
// FIXME: Doesn't work? return P.getAs< void >();
return P.getAsOpaquePtr();