[Debug Info] add DISubroutineType and its creation takes DITypeArray.

DITypeArray is an array of DITypeRef, at its creation, we will create
DITypeRef (i.e use the identifier if the type node has an identifier).

This is the last patch to unique the type array of a subroutine type.

rdar://17628609


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214132 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Manman Ren
2014-07-28 22:24:06 +00:00
parent 0b783fc554
commit 807538b567
12 changed files with 283 additions and 23 deletions

View File

@@ -720,9 +720,9 @@ DICompositeType DIBuilder::createUnionType(DIDescriptor Scope, StringRef Name,
}
/// createSubroutineType - Create subroutine type.
DICompositeType DIBuilder::createSubroutineType(DIFile File,
DIArray ParameterTypes,
unsigned Flags) {
DISubroutineType DIBuilder::createSubroutineType(DIFile File,
DITypeArray ParameterTypes,
unsigned Flags) {
// TAG_subroutine_type is encoded in DICompositeType format.
Value *Elts[] = {
GetTagConstant(VMContext, dwarf::DW_TAG_subroutine_type),
@@ -741,7 +741,7 @@ DICompositeType DIBuilder::createSubroutineType(DIFile File,
nullptr,
nullptr // Type Identifer
};
return DICompositeType(MDNode::get(VMContext, Elts));
return DISubroutineType(MDNode::get(VMContext, Elts));
}
/// createEnumerationType - Create debugging information entry for an