mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
The debugger sometimes lookup dynamically in the runtime to find ivar info of any Objective-C classes. It would be very helpful to debugger if the compiler encodes runtime version number in DWARF.
Add support for two additional DWARF attributes to encode Objective-C runtime version number. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64834 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -453,7 +453,8 @@ DICompileUnit DIFactory::CreateCompileUnit(unsigned LangID,
|
||||
const std::string &Producer,
|
||||
bool isMain,
|
||||
bool isOptimized,
|
||||
const char *Flags) {
|
||||
const char *Flags,
|
||||
unsigned RunTimeVer) {
|
||||
Constant *Elts[] = {
|
||||
GetTagConstant(dwarf::DW_TAG_compile_unit),
|
||||
getCastToEmpty(GetOrCreateCompileUnitAnchor()),
|
||||
@ -463,7 +464,8 @@ DICompileUnit DIFactory::CreateCompileUnit(unsigned LangID,
|
||||
GetStringConstant(Producer),
|
||||
ConstantInt::get(Type::Int1Ty, isMain),
|
||||
ConstantInt::get(Type::Int1Ty, isOptimized),
|
||||
GetStringConstant(Flags)
|
||||
GetStringConstant(Flags),
|
||||
ConstantInt::get(Type::Int32Ty, RunTimeVer)
|
||||
};
|
||||
|
||||
Constant *Init = ConstantStruct::get(Elts, sizeof(Elts)/sizeof(Elts[0]));
|
||||
@ -573,7 +575,8 @@ DICompositeType DIFactory::CreateCompositeType(unsigned Tag,
|
||||
uint64_t OffsetInBits,
|
||||
unsigned Flags,
|
||||
DIType DerivedFrom,
|
||||
DIArray Elements) {
|
||||
DIArray Elements,
|
||||
unsigned RuntimeLang) {
|
||||
|
||||
Constant *Elts[] = {
|
||||
GetTagConstant(Tag),
|
||||
@ -586,7 +589,8 @@ DICompositeType DIFactory::CreateCompositeType(unsigned Tag,
|
||||
ConstantInt::get(Type::Int64Ty, OffsetInBits),
|
||||
ConstantInt::get(Type::Int32Ty, Flags),
|
||||
getCastToEmpty(DerivedFrom),
|
||||
getCastToEmpty(Elements)
|
||||
getCastToEmpty(Elements),
|
||||
ConstantInt::get(Type::Int32Ty, RuntimeLang)
|
||||
};
|
||||
|
||||
Constant *Init = ConstantStruct::get(Elts, sizeof(Elts)/sizeof(Elts[0]));
|
||||
|
Reference in New Issue
Block a user