mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 17:33:24 +00:00
DIBuilder: support structs with vtable pointers in the same way as classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176004 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
29cb2591f9
commit
6172f02983
@ -282,10 +282,12 @@ namespace llvm {
|
||||
/// @param Flags Flags to encode member attribute, e.g. private
|
||||
/// @param Elements Struct elements.
|
||||
/// @param RunTimeLang Optional parameter, Objective-C runtime version.
|
||||
DIType createStructType(DIDescriptor Scope, StringRef Name, DIFile File,
|
||||
unsigned LineNumber, uint64_t SizeInBits,
|
||||
uint64_t AlignInBits, unsigned Flags,
|
||||
DIArray Elements, unsigned RunTimeLang = 0);
|
||||
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);
|
||||
|
||||
/// createUnionType - Create debugging information entry for an union.
|
||||
/// @param Scope Scope in which this union is defined.
|
||||
|
@ -508,11 +508,15 @@ DIType DIBuilder::createClassType(DIDescriptor Context, StringRef Name,
|
||||
}
|
||||
|
||||
/// createStructType - Create debugging information entry for a struct.
|
||||
DIType DIBuilder::createStructType(DIDescriptor Context, StringRef Name,
|
||||
DIFile File, unsigned LineNumber,
|
||||
uint64_t SizeInBits, uint64_t AlignInBits,
|
||||
unsigned Flags, DIArray Elements,
|
||||
unsigned RunTimeLang) {
|
||||
DICompositeType DIBuilder::createStructType(DIDescriptor Context,
|
||||
StringRef Name, DIFile File,
|
||||
unsigned LineNumber,
|
||||
uint64_t SizeInBits,
|
||||
uint64_t AlignInBits,
|
||||
unsigned Flags, DIType DerivedFrom,
|
||||
DIArray Elements,
|
||||
unsigned RunTimeLang,
|
||||
MDNode *VTableHolder) {
|
||||
// TAG_structure_type is encoded in DICompositeType format.
|
||||
Value *Elts[] = {
|
||||
GetTagConstant(VMContext, dwarf::DW_TAG_structure_type),
|
||||
@ -524,13 +528,13 @@ DIType DIBuilder::createStructType(DIDescriptor Context, StringRef Name,
|
||||
ConstantInt::get(Type::getInt64Ty(VMContext), AlignInBits),
|
||||
ConstantInt::get(Type::getInt32Ty(VMContext), 0),
|
||||
ConstantInt::get(Type::getInt32Ty(VMContext), Flags),
|
||||
NULL,
|
||||
DerivedFrom,
|
||||
Elements,
|
||||
ConstantInt::get(Type::getInt32Ty(VMContext), RunTimeLang),
|
||||
NULL,
|
||||
VTableHolder,
|
||||
NULL,
|
||||
};
|
||||
return DIType(MDNode::get(VMContext, Elts));
|
||||
return DICompositeType(MDNode::get(VMContext, Elts));
|
||||
}
|
||||
|
||||
/// createUnionType - Create debugging information entry for an union.
|
||||
|
Loading…
Reference in New Issue
Block a user