diff options
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/DIBuilder.cpp | 11 | ||||
-rw-r--r-- | lib/Analysis/DebugInfo.cpp | 13 |
2 files changed, 21 insertions, 3 deletions
diff --git a/lib/Analysis/DIBuilder.cpp b/lib/Analysis/DIBuilder.cpp index f0bdc48cf3..ddf57f84a8 100644 --- a/lib/Analysis/DIBuilder.cpp +++ b/lib/Analysis/DIBuilder.cpp @@ -385,16 +385,21 @@ DIType DIBuilder::createObjCIVar(StringRef Name, /// createObjCProperty - Create debugging information entry for Objective-C /// property. -DIObjCProperty DIBuilder::createObjCProperty(StringRef Name, +DIObjCProperty DIBuilder::createObjCProperty(StringRef Name, + DIFile File, unsigned LineNumber, StringRef GetterName, StringRef SetterName, - unsigned PropertyAttributes) { + unsigned PropertyAttributes, + DIType Ty) { Value *Elts[] = { GetTagConstant(VMContext, dwarf::DW_TAG_APPLE_Property), MDString::get(VMContext, Name), + File, + ConstantInt::get(Type::getInt32Ty(VMContext), LineNumber), MDString::get(VMContext, GetterName), MDString::get(VMContext, SetterName), - ConstantInt::get(Type::getInt32Ty(VMContext), PropertyAttributes) + ConstantInt::get(Type::getInt32Ty(VMContext), PropertyAttributes), + Ty }; return DIObjCProperty(MDNode::get(VMContext, Elts)); } diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index e30c0a9b33..c9a619863b 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/lib/Analysis/DebugInfo.cpp @@ -377,6 +377,19 @@ bool DICompileUnit::Verify() const { return true; } +/// Verify - Verify that an ObjC property is well formed. +bool DIObjCProperty::Verify() const { + if (!DbgNode) + return false; + unsigned Tag = getTag(); + if (Tag != dwarf::DW_TAG_APPLE_Property) return false; + DIType Ty = getType(); + if (!Ty.Verify()) return false; + + // Don't worry about the rest of the strings for now. + return true; +} + /// Verify - Verify that a type descriptor is well formed. bool DIType::Verify() const { if (!DbgNode) |