diff options
author | Devang Patel <dpatel@apple.com> | 2011-04-16 00:11:51 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-04-16 00:11:51 +0000 |
commit | e9db5e29e3af91eec572bfeb8dcec908213298b0 (patch) | |
tree | 1e5f3c7aaf6f5f0ace5117cc343edef860e800d3 /lib/Analysis | |
parent | 3a96122c4ae4e7727ba976a9f658626c18997689 (diff) | |
download | external_llvm-e9db5e29e3af91eec572bfeb8dcec908213298b0.zip external_llvm-e9db5e29e3af91eec572bfeb8dcec908213298b0.tar.gz external_llvm-e9db5e29e3af91eec572bfeb8dcec908213298b0.tar.bz2 |
Introduce support to encode Objective-C property information in debugging information generated for an interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129624 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/DIBuilder.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/Analysis/DIBuilder.cpp b/lib/Analysis/DIBuilder.cpp index 108d2d2..9fea65b 100644 --- a/lib/Analysis/DIBuilder.cpp +++ b/lib/Analysis/DIBuilder.cpp @@ -236,6 +236,35 @@ DIType DIBuilder::createMemberType(StringRef Name, return DIType(MDNode::get(VMContext, &Elts[0], array_lengthof(Elts))); } +/// createObjCIVar - Create debugging information entry for Objective-C +/// instance variable. +DIType DIBuilder::createObjCIVar(StringRef Name, + DIFile File, unsigned LineNumber, + uint64_t SizeInBits, uint64_t AlignInBits, + uint64_t OffsetInBits, unsigned Flags, + DIType Ty, StringRef PropertyName, + StringRef GetterName, StringRef SetterName, + unsigned PropertyAttributes) { + // TAG_member is encoded in DIDerivedType format. + Value *Elts[] = { + GetTagConstant(VMContext, dwarf::DW_TAG_member), + File, // Or TheCU ? Ty ? + MDString::get(VMContext, Name), + File, + ConstantInt::get(Type::getInt32Ty(VMContext), LineNumber), + ConstantInt::get(Type::getInt64Ty(VMContext), SizeInBits), + ConstantInt::get(Type::getInt64Ty(VMContext), AlignInBits), + ConstantInt::get(Type::getInt64Ty(VMContext), OffsetInBits), + ConstantInt::get(Type::getInt32Ty(VMContext), Flags), + Ty, + MDString::get(VMContext, PropertyName), + MDString::get(VMContext, GetterName), + MDString::get(VMContext, SetterName), + ConstantInt::get(Type::getInt32Ty(VMContext), PropertyAttributes) + }; + return DIType(MDNode::get(VMContext, &Elts[0], array_lengthof(Elts))); +} + /// createClassType - Create debugging information entry for a class. DIType DIBuilder::createClassType(DIDescriptor Context, StringRef Name, DIFile File, unsigned LineNumber, |