[llvm] r234186 - DebugInfo: Remove dead DIRef::getName()

Duncan P. N. Exon Smith dexonsmith at apple.com
Mon Apr 6 10:52:46 PDT 2015


Author: dexonsmith
Date: Mon Apr  6 12:52:46 2015
New Revision: 234186

URL: http://llvm.org/viewvc/llvm-project?rev=234186&view=rev
Log:
DebugInfo: Remove dead DIRef::getName()

Modified:
    llvm/trunk/include/llvm/IR/DebugInfo.h

Modified: llvm/trunk/include/llvm/IR/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfo.h?rev=234186&r1=234185&r2=234186&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/IR/DebugInfo.h Mon Apr  6 12:52:46 2015
@@ -291,7 +291,6 @@ template <typename T> class DIRef {
 
 public:
   T resolve(const DITypeIdentifierMap &Map) const;
-  StringRef getName() const;
   operator Metadata *() const { return const_cast<Metadata *>(Val); }
 
   static DIRef get(const Metadata *MD) { return DIRef(MD); }
@@ -314,17 +313,6 @@ T DIRef<T>::resolve(const DITypeIdentifi
   return T(Iter->second);
 }
 
-template <typename T> StringRef DIRef<T>::getName() const {
-  if (!Val)
-    return StringRef();
-
-  if (const MDNode *MD = dyn_cast<MDNode>(Val))
-    return T(MD).getName();
-
-  const MDString *MS = cast<MDString>(Val);
-  return MS->getString();
-}
-
 /// \brief Handle fields that are references to DIDescriptors.
 template <>
 DIDescriptorRef DIDescriptor::getFieldAs<DIDescriptorRef>(unsigned Elt) const;





More information about the llvm-commits mailing list