From 0567cb7e1aed86bdbfdf2f8575984874426e6465 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Fri, 24 Jul 2015 20:46:46 +0000 Subject: [PATCH] DI: Remove dead code: getDICompositeType() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243158 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/DebugInfo.h | 3 --- lib/IR/DebugInfo.cpp | 15 --------------- 2 files changed, 18 deletions(-) diff --git a/include/llvm/IR/DebugInfo.h b/include/llvm/IR/DebugInfo.h index 5429648ade2..a06174827ba 100644 --- a/include/llvm/IR/DebugInfo.h +++ b/include/llvm/IR/DebugInfo.h @@ -44,9 +44,6 @@ DISubprogram *getDISubprogram(const MDNode *Scope); /// \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); diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp index ca343f7fac8..cccbaf687f8 100644 --- a/lib/IR/DebugInfo.cpp +++ b/lib/IR/DebugInfo.cpp @@ -56,21 +56,6 @@ DISubprogram *llvm::getDISubprogram(const Function *F) { return nullptr; } -DICompositeTypeBase *llvm::getDICompositeType(DIType *T) { - if (auto *C = dyn_cast_or_null(T)) - return C; - - if (auto *D = dyn_cast_or_null(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; -- 2.34.1