diff --git a/include/llvm/IR/DebugInfo.h b/include/llvm/IR/DebugInfo.h index 4bc51e12edc..a11cfad802a 100644 --- a/include/llvm/IR/DebugInfo.h +++ b/include/llvm/IR/DebugInfo.h @@ -291,7 +291,6 @@ template class DIRef { public: T resolve(const DITypeIdentifierMap &Map) const; - StringRef getName() const; operator Metadata *() const { return const_cast(Val); } static DIRef get(const Metadata *MD) { return DIRef(MD); } @@ -314,17 +313,6 @@ T DIRef::resolve(const DITypeIdentifierMap &Map) const { return T(Iter->second); } -template StringRef DIRef::getName() const { - if (!Val) - return StringRef(); - - if (const MDNode *MD = dyn_cast(Val)) - return T(MD).getName(); - - const MDString *MS = cast(Val); - return MS->getString(); -} - /// \brief Handle fields that are references to DIDescriptors. template <> DIDescriptorRef DIDescriptor::getFieldAs(unsigned Elt) const;