Fix struct member's scope. Patch by Xi Wang.

llvm-svn: 133828
This commit is contained in:
Devang Patel 2011-06-24 22:00:39 +00:00
parent 23c29fea92
commit 503c3998f3
2 changed files with 4 additions and 3 deletions

View File

@ -135,6 +135,7 @@ namespace llvm {
unsigned Flags);
/// createMemberType - Create debugging information entry for a member.
/// @param Scope Member scope.
/// @param Name Member name.
/// @param File File where this member is defined.
/// @param LineNo Line number.
@ -143,7 +144,7 @@ namespace llvm {
/// @param OffsetInBits Member offset.
/// @param Flags Flags to encode member attribute, e.g. private
/// @param Ty Parent type.
DIType createMemberType(StringRef Name, DIFile File,
DIType createMemberType(DIDescriptor Scope, StringRef Name, DIFile File,
unsigned LineNo, uint64_t SizeInBits,
uint64_t AlignInBits, uint64_t OffsetInBits,
unsigned Flags, DIType Ty);

View File

@ -219,7 +219,7 @@ DIType DIBuilder::createInheritance(DIType Ty, DIType BaseTy,
}
/// createMemberType - Create debugging information entry for a member.
DIType DIBuilder::createMemberType(StringRef Name,
DIType DIBuilder::createMemberType(DIDescriptor Scope, StringRef Name,
DIFile File, unsigned LineNumber,
uint64_t SizeInBits, uint64_t AlignInBits,
uint64_t OffsetInBits, unsigned Flags,
@ -227,7 +227,7 @@ DIType DIBuilder::createMemberType(StringRef Name,
// TAG_member is encoded in DIDerivedType format.
Value *Elts[] = {
GetTagConstant(VMContext, dwarf::DW_TAG_member),
File, // Or TheCU ? Ty ?
Scope,
MDString::get(VMContext, Name),
File,
ConstantInt::get(Type::getInt32Ty(VMContext), LineNumber),