mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
Add support for objc property decls according to the page at:
http://llvm.org/docs/SourceLevelDebugging.html#objcproperty including type and DECL. Expand the metadata needed accordingly. rdar://11144023 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153639 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -186,6 +186,24 @@ void CompileUnit::addSourceLine(DIE *Die, DIType Ty) {
|
||||
addUInt(Die, dwarf::DW_AT_decl_line, 0, Line);
|
||||
}
|
||||
|
||||
/// addSourceLine - Add location information to specified debug information
|
||||
/// entry.
|
||||
void CompileUnit::addSourceLine(DIE *Die, DIObjCProperty Ty) {
|
||||
// Verify type.
|
||||
if (!Ty.Verify())
|
||||
return;
|
||||
|
||||
unsigned Line = Ty.getLineNumber();
|
||||
if (Line == 0)
|
||||
return;
|
||||
DIFile File = Ty.getFile();
|
||||
unsigned FileID = DD->GetOrCreateSourceID(File.getFilename(),
|
||||
File.getDirectory());
|
||||
assert(FileID && "Invalid file id");
|
||||
addUInt(Die, dwarf::DW_AT_decl_file, 0, FileID);
|
||||
addUInt(Die, dwarf::DW_AT_decl_line, 0, Line);
|
||||
}
|
||||
|
||||
/// addSourceLine - Add location information to specified debug information
|
||||
/// entry.
|
||||
void CompileUnit::addSourceLine(DIE *Die, DINameSpace NS) {
|
||||
@@ -839,6 +857,8 @@ void CompileUnit::constructTypeDIE(DIE &Buffer, DICompositeType CTy) {
|
||||
ElemDie = new DIE(Property.getTag());
|
||||
StringRef PropertyName = Property.getObjCPropertyName();
|
||||
addString(ElemDie, dwarf::DW_AT_APPLE_property_name, PropertyName);
|
||||
addType(ElemDie, Property.getType());
|
||||
addSourceLine(ElemDie, Property);
|
||||
StringRef GetterName = Property.getObjCPropertyGetterName();
|
||||
if (!GetterName.empty())
|
||||
addString(ElemDie, dwarf::DW_AT_APPLE_property_getter, GetterName);
|
||||
|
||||
Reference in New Issue
Block a user