-/// \brief Represents reference to a DIDescriptor.
-///
-/// Abstracts over direct and identifier-based metadata references.
-template <typename T> class DIRef {
- /// \brief Val can be either a MDNode or a MDString.
- ///
- /// In the latter, MDString specifies the type identifier.
- const Metadata *Val;
-
-public:
- template <class U>
- DIRef(const TypedDebugNodeRef<U> &Ref,
- typename std::enable_if<std::is_convertible<U *, T>::value>::type * =
- nullptr)
- : Val(Ref) {}
-
- T resolve(const DITypeIdentifierMap &Map) const;
- operator Metadata *() const { return const_cast<Metadata *>(Val); }
-};
-
-template <>
-DIDescriptor DIRef<DIDescriptor>::resolve(const DITypeIdentifierMap &Map) const;
-template <>
-DIScope DIRef<DIScope>::resolve(const DITypeIdentifierMap &Map) const;
-template <> DIType DIRef<DIType>::resolve(const DITypeIdentifierMap &Map) const;
-