forked from OSchip/llvm-project
Revert "DebugInfo: remove unused helper function getDICompositeType."
This reverts commit r185876 as the functions appear to still be used by dragonegg. llvm-svn: 185890
This commit is contained in:
parent
b3d41a278b
commit
215a77585d
|
@ -695,6 +695,9 @@ namespace llvm {
|
|||
/// getDISubprogram - Find subprogram that is enclosing this scope.
|
||||
DISubprogram getDISubprogram(const MDNode *Scope);
|
||||
|
||||
/// getDICompositeType - Find underlying composite type.
|
||||
DICompositeType getDICompositeType(DIType T);
|
||||
|
||||
/// isSubprogramContext - Return true if Context is either a subprogram
|
||||
/// or another context nested inside a subprogram.
|
||||
bool isSubprogramContext(const MDNode *Context);
|
||||
|
|
|
@ -844,6 +844,17 @@ DISubprogram llvm::getDISubprogram(const MDNode *Scope) {
|
|||
return DISubprogram();
|
||||
}
|
||||
|
||||
/// getDICompositeType - Find underlying composite type.
|
||||
DICompositeType llvm::getDICompositeType(DIType T) {
|
||||
if (T.isCompositeType())
|
||||
return DICompositeType(T);
|
||||
|
||||
if (T.isDerivedType())
|
||||
return getDICompositeType(DIDerivedType(T).getTypeDerivedFrom());
|
||||
|
||||
return DICompositeType();
|
||||
}
|
||||
|
||||
/// isSubprogramContext - Return true if Context is either a subprogram
|
||||
/// or another context nested inside a subprogram.
|
||||
bool llvm::isSubprogramContext(const MDNode *Context) {
|
||||
|
|
Loading…
Reference in New Issue