it to be stuck into a SmallPtrSet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67967
91177308-0d34-0410-b5e6-
96231b3b80d8
using llvm::dyn_cast;
using llvm::dyn_cast_or_null;
+namespace llvm {
+ template <typename T>
+ class PointerLikeTypeInfo;
+}
+
namespace clang {
class ASTContext;
class Type;
template<> struct simplify_type< ::clang::QualType>
: public simplify_type<const ::clang::QualType> {};
+// Teach SmallPtrSet that QualType is "basically a pointer".
+template<>
+class PointerLikeTypeInfo<clang::QualType> {
+public:
+ static inline void *getAsVoidPointer(clang::QualType P) {
+ return P.getAsOpaquePtr();
+ }
+ static inline clang::QualType getFromVoidPointer(void *P) {
+ return clang::QualType::getFromOpaquePtr(P);
+ }
+};
} // end namespace llvm
namespace clang {