DIBuilder: take an optional StringRef to pass in unique identifier.

createClassType, createStructType, createUnionType, createEnumerationType,
and createForwardDecl will take an optional StringRef to pass in
the unique identifier.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189410 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Manman Ren
2013-08-27 23:06:40 +00:00
parent ffba4c7e69
commit 23f84cb140
2 changed files with 29 additions and 19 deletions

View File

@ -279,13 +279,15 @@ namespace llvm {
/// DW_AT_containing_type. See DWARF documentation
/// for more info.
/// @param TemplateParms Template type parameters.
/// @param UniqueIdentifier A unique identifier for the class.
DICompositeType createClassType(DIDescriptor Scope, StringRef Name,
DIFile File, unsigned LineNumber,
uint64_t SizeInBits, uint64_t AlignInBits,
uint64_t OffsetInBits, unsigned Flags,
DIType DerivedFrom, DIArray Elements,
MDNode *VTableHolder = 0,
MDNode *TemplateParms = 0);
MDNode *TemplateParms = 0,
StringRef UniqueIdentifier = StringRef());
/// createStructType - Create debugging information entry for a struct.
/// @param Scope Scope in which this struct is defined.
@ -297,12 +299,14 @@ namespace llvm {
/// @param Flags Flags to encode member attribute, e.g. private
/// @param Elements Struct elements.
/// @param RunTimeLang Optional parameter, Objective-C runtime version.
/// @param UniqueIdentifier A unique identifier for the struct.
DICompositeType createStructType(DIDescriptor Scope, StringRef Name,
DIFile File, unsigned LineNumber,
uint64_t SizeInBits, uint64_t AlignInBits,
unsigned Flags, DIType DerivedFrom,
DIArray Elements, unsigned RunTimeLang = 0,
MDNode *VTableHolder = 0);
MDNode *VTableHolder = 0,
StringRef UniqueIdentifier = StringRef());
/// createUnionType - Create debugging information entry for an union.
/// @param Scope Scope in which this union is defined.
@ -314,10 +318,12 @@ namespace llvm {
/// @param Flags Flags to encode member attribute, e.g. private
/// @param Elements Union elements.
/// @param RunTimeLang Optional parameter, Objective-C runtime version.
/// @param UniqueIdentifier A unique identifier for the union.
DICompositeType createUnionType(
DIDescriptor Scope, StringRef Name, DIFile File, unsigned LineNumber,
uint64_t SizeInBits, uint64_t AlignInBits, unsigned Flags,
DIArray Elements, unsigned RunTimeLang = 0);
DIArray Elements, unsigned RunTimeLang = 0,
StringRef UniqueIdentifier = StringRef());
/// createTemplateTypeParameter - Create debugging information for template
/// type parameter.
@ -398,12 +404,11 @@ namespace llvm {
/// @param AlignInBits Member alignment.
/// @param Elements Enumeration elements.
/// @param UnderlyingType Underlying type of a C++11/ObjC fixed enum.
/// @param UniqueIdentifier A unique identifier for the enum.
DICompositeType createEnumerationType(DIDescriptor Scope, StringRef Name,
DIFile File, unsigned LineNumber,
uint64_t SizeInBits,
uint64_t AlignInBits,
DIArray Elements,
DIType UnderlyingType);
DIFile File, unsigned LineNumber, uint64_t SizeInBits,
uint64_t AlignInBits, DIArray Elements, DIType UnderlyingType,
StringRef UniqueIdentifier = StringRef());
/// createSubroutineType - Create subroutine type.
/// @param File File in which this subroutine is defined.
@ -423,7 +428,8 @@ namespace llvm {
DIDescriptor Scope, DIFile F,
unsigned Line, unsigned RuntimeLang = 0,
uint64_t SizeInBits = 0,
uint64_t AlignInBits = 0);
uint64_t AlignInBits = 0,
StringRef UniqueIdentifier = StringRef());
/// retainType - Retain DIType in a module even if it is not referenced
/// through debug info anchors.