DI: Remove dead code: getDICompositeType()
llvm-svn: 243158
This commit is contained in:
parent
acd8cf8582
commit
3c5a56b13c
|
@ -44,9 +44,6 @@ DISubprogram *getDISubprogram(const MDNode *Scope);
|
||||||
/// \returns a valid subprogram, if found. Otherwise, return \c nullptr.
|
/// \returns a valid subprogram, if found. Otherwise, return \c nullptr.
|
||||||
DISubprogram *getDISubprogram(const Function *F);
|
DISubprogram *getDISubprogram(const Function *F);
|
||||||
|
|
||||||
/// \brief Find underlying composite type.
|
|
||||||
DICompositeTypeBase *getDICompositeType(DIType *T);
|
|
||||||
|
|
||||||
/// \brief Generate map by visiting all retained types.
|
/// \brief Generate map by visiting all retained types.
|
||||||
DITypeIdentifierMap generateDITypeIdentifierMap(const NamedMDNode *CU_Nodes);
|
DITypeIdentifierMap generateDITypeIdentifierMap(const NamedMDNode *CU_Nodes);
|
||||||
|
|
||||||
|
|
|
@ -56,21 +56,6 @@ DISubprogram *llvm::getDISubprogram(const Function *F) {
|
||||||
return nullptr;
|
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
|
DITypeIdentifierMap
|
||||||
llvm::generateDITypeIdentifierMap(const NamedMDNode *CU_Nodes) {
|
llvm::generateDITypeIdentifierMap(const NamedMDNode *CU_Nodes) {
|
||||||
DITypeIdentifierMap Map;
|
DITypeIdentifierMap Map;
|
||||||
|
|
Loading…
Reference in New Issue