[llvm] r243158 - DI: Remove dead code: getDICompositeType()

Duncan P. N. Exon Smith dexonsmith at apple.com
Fri Jul 24 13:46:46 PDT 2015


Author: dexonsmith
Date: Fri Jul 24 15:46:46 2015
New Revision: 243158

URL: http://llvm.org/viewvc/llvm-project?rev=243158&view=rev
Log:
DI: Remove dead code: getDICompositeType()

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

Modified: llvm/trunk/include/llvm/IR/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfo.h?rev=243158&r1=243157&r2=243158&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/IR/DebugInfo.h Fri Jul 24 15:46:46 2015
@@ -44,9 +44,6 @@ DISubprogram *getDISubprogram(const MDNo
 /// \returns a valid subprogram, if found. Otherwise, return \c nullptr.
 DISubprogram *getDISubprogram(const Function *F);
 
-/// \brief Find underlying composite type.
-DICompositeTypeBase *getDICompositeType(DIType *T);
-
 /// \brief Generate map by visiting all retained types.
 DITypeIdentifierMap generateDITypeIdentifierMap(const NamedMDNode *CU_Nodes);
 

Modified: llvm/trunk/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=243158&r1=243157&r2=243158&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Fri Jul 24 15:46:46 2015
@@ -56,21 +56,6 @@ DISubprogram *llvm::getDISubprogram(cons
   return nullptr;
 }
 
-DICompositeTypeBase *llvm::getDICompositeType(DIType *T) {
-  if (auto *C = dyn_cast_or_null<DICompositeTypeBase>(T))
-    return C;
-
-  if (auto *D = dyn_cast_or_null<DIDerivedType>(T)) {
-    // This function is currently used by dragonegg and dragonegg does
-    // not generate identifier for types, so using an empty map to resolve
-    // DerivedFrom should be fine.
-    DITypeIdentifierMap EmptyMap;
-    return getDICompositeType(D->getBaseType().resolve(EmptyMap));
-  }
-
-  return nullptr;
-}
-
 DITypeIdentifierMap
 llvm::generateDITypeIdentifierMap(const NamedMDNode *CU_Nodes) {
   DITypeIdentifierMap Map;





More information about the llvm-commits mailing list