[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

@@ -232,7 +232,7 @@ protected:
// Function DI
DIFile File = DBuilder.createFile("filename.c", "/file/dir/");
DIArray ParamTypes = DBuilder.getOrCreateArray(ArrayRef<Value*>());
DITypeArray ParamTypes = DBuilder.getOrCreateTypeArray(None);
DICompositeType FuncType = DBuilder.createSubroutineType(File, ParamTypes);
DICompileUnit CU = DBuilder.createCompileUnit(dwarf::DW_LANG_C99,
"filename.c", "/file/dir", "CloneFunc", false, "", 0);