summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-05-12 19:06:16 +0000
committerDevang Patel <dpatel@apple.com>2011-05-12 19:06:16 +0000
commit2409e7843b714c83570c537a12f41fbe99c2e165 (patch)
treee80fcdaae0e9d754e4793f614a11fa0617d02844 /llvm/lib
parente106c3481784ecfda9cb014cb2cfea5b3d13bbc9 (diff)
downloadbcm5719-llvm-2409e7843b714c83570c537a12f41fbe99c2e165.tar.gz
bcm5719-llvm-2409e7843b714c83570c537a12f41fbe99c2e165.zip
Let Objective-C front-end identify class extension, in dwarf output, using an attribute DW_AT_APPLE_objc_class_extension.
llvm-svn: 131238
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp4
-rw-r--r--llvm/lib/Support/Dwarf.cpp1
2 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 98af7a41e7f..4eb40947752 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -766,6 +766,10 @@ void CompileUnit::constructTypeDIE(DIE &Buffer, DICompositeType CTy) {
addToContextOwner(&Buffer, Context);
}
+ if (CTy.isObjcClassExtension())
+ addUInt(&Buffer, dwarf::DW_AT_APPLE_objc_class_extension,
+ dwarf::DW_FORM_flag, 1);
+
if (Tag == dwarf::DW_TAG_class_type)
addTemplateParams(Buffer, CTy.getTemplateParams());
diff --git a/llvm/lib/Support/Dwarf.cpp b/llvm/lib/Support/Dwarf.cpp
index 74a9fda7ab6..cbf8aad5f22 100644
--- a/llvm/lib/Support/Dwarf.cpp
+++ b/llvm/lib/Support/Dwarf.cpp
@@ -207,6 +207,7 @@ const char *llvm::dwarf::AttributeString(unsigned Attribute) {
case DW_AT_APPLE_property_getter: return "DW_AT_APPLE_property_getter";
case DW_AT_APPLE_property_setter: return "DW_AT_APPLE_property_setter";
case DW_AT_APPLE_property_attribute: return "DW_AT_APPLE_property_attribute";
+ case DW_AT_APPLE_objc_class_extension: return "DW_AT_APPLE_objc_class_extension";
}
return 0;
}
OpenPOWER on IntegriCloud