[llvm] r183543 - DIBuilder: No functionality change.

Eric Christopher echristo at gmail.com
Fri Jun 7 18:47:35 PDT 2013


Cool deal. Thanks. :)
On Jun 7, 2013 4:38 PM, "Manman Ren" <mren at apple.com> wrote:

>
> For consistance and readability, other helper functions return the
> concrete class, not DIType.
>
> Thanks,
> Manman
>
> On Jun 7, 2013, at 2:27 PM, Eric Christopher wrote:
>
> > Not complaining, but curious what inspired the change?
> >
> > -eric
> >
> > On Fri, Jun 7, 2013 at 11:35 AM, Manman Ren <mren at apple.com> wrote:
> >> Author: mren
> >> Date: Fri Jun  7 13:35:53 2013
> >> New Revision: 183543
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=183543&view=rev
> >> Log:
> >> DIBuilder: No functionality change.
> >>
> >> Use the correct DIType when creating types in DIBuilder.
> >>
> >> Modified:
> >>    llvm/trunk/include/llvm/DIBuilder.h
> >>    llvm/trunk/lib/IR/DIBuilder.cpp
> >>
> >> Modified: llvm/trunk/include/llvm/DIBuilder.h
> >> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DIBuilder.h?rev=183543&r1=183542&r2=183543&view=diff
> >>
> ==============================================================================
> >> --- llvm/trunk/include/llvm/DIBuilder.h (original)
> >> +++ llvm/trunk/include/llvm/DIBuilder.h Fri Jun  7 13:35:53 2013
> >> @@ -110,7 +110,7 @@ namespace llvm {
> >>     DIEnumerator createEnumerator(StringRef Name, uint64_t Val);
> >>
> >>     /// createNullPtrType - Create C++0x nullptr type.
> >> -    DIType createNullPtrType(StringRef Name);
> >> +    DIBasicType createNullPtrType(StringRef Name);
> >>
> >>     /// createBasicType - Create debugging information entry for a basic
> >>     /// type.
> >> @@ -155,7 +155,7 @@ namespace llvm {
> >>                                 unsigned LineNo, DIDescriptor Context);
> >>
> >>     /// createFriend - Create debugging information entry for a
> 'friend'.
> >> -    DIType createFriend(DIType Ty, DIType FriendTy);
> >> +    DIDerivedType createFriend(DIType Ty, DIType FriendTy);
> >>
> >>     /// createInheritance - Create debugging information entry to
> establish
> >>     /// inheritance relationship between two types.
> >> @@ -191,9 +191,10 @@ namespace llvm {
> >>     /// @param Ty         Type of the static member.
> >>     /// @param Flags      Flags to encode member attribute, e.g.
> private.
> >>     /// @param Val        Const initializer of the member.
> >> -    DIType createStaticMemberType(DIDescriptor Scope, StringRef Name,
> >> -                                  DIFile File, unsigned LineNo, DIType
> Ty,
> >> -                                  unsigned Flags, llvm::Value *Val);
> >> +    DIDerivedType
> >> +    createStaticMemberType(DIDescriptor Scope, StringRef Name,
> >> +                           DIFile File, unsigned LineNo, DIType Ty,
> >> +                           unsigned Flags, llvm::Value *Val);
> >>
> >>     /// createObjCIVar - Create debugging information entry for
> Objective-C
> >>     /// instance variable.
> >> @@ -212,14 +213,14 @@ namespace llvm {
> >>     /// @param PropertySetterName Name of the Objective C property
> setter
> >>     ///                           selector.
> >>     /// @param PropertyAttributes Objective C property attributes.
> >> -    DIType createObjCIVar(StringRef Name, DIFile File,
> >> -                          unsigned LineNo, uint64_t SizeInBits,
> >> -                          uint64_t AlignInBits, uint64_t OffsetInBits,
> >> -                          unsigned Flags, DIType Ty,
> >> -                          StringRef PropertyName = StringRef(),
> >> -                          StringRef PropertyGetterName = StringRef(),
> >> -                          StringRef PropertySetterName = StringRef(),
> >> -                          unsigned PropertyAttributes = 0);
> >> +    DIDerivedType createObjCIVar(StringRef Name, DIFile File,
> >> +                                 unsigned LineNo, uint64_t SizeInBits,
> >> +                                 uint64_t AlignInBits, uint64_t
> OffsetInBits,
> >> +                                 unsigned Flags, DIType Ty,
> >> +                                 StringRef PropertyName = StringRef(),
> >> +                                 StringRef PropertyGetterName =
> StringRef(),
> >> +                                 StringRef PropertySetterName =
> StringRef(),
> >> +                                 unsigned PropertyAttributes = 0);
> >>
> >>     /// createObjCIVar - Create debugging information entry for
> Objective-C
> >>     /// instance variable.
> >> @@ -232,11 +233,11 @@ namespace llvm {
> >>     /// @param Flags        Flags to encode member attribute, e.g.
> private
> >>     /// @param Ty           Parent type.
> >>     /// @param PropertyNode Property associated with this ivar.
> >> -    DIType createObjCIVar(StringRef Name, DIFile File,
> >> -                          unsigned LineNo, uint64_t SizeInBits,
> >> -                          uint64_t AlignInBits, uint64_t OffsetInBits,
> >> -                          unsigned Flags, DIType Ty,
> >> -                          MDNode *PropertyNode);
> >> +    DIDerivedType createObjCIVar(StringRef Name, DIFile File,
> >> +                                 unsigned LineNo, uint64_t SizeInBits,
> >> +                                 uint64_t AlignInBits, uint64_t
> OffsetInBits,
> >> +                                 unsigned Flags, DIType Ty,
> >> +                                 MDNode *PropertyNode);
> >>
> >>     /// createObjCProperty - Create debugging information entry for
> Objective-C
> >>     /// property.
> >>
> >> Modified: llvm/trunk/lib/IR/DIBuilder.cpp
> >> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DIBuilder.cpp?rev=183543&r1=183542&r2=183543&view=diff
> >>
> ==============================================================================
> >> --- llvm/trunk/lib/IR/DIBuilder.cpp (original)
> >> +++ llvm/trunk/lib/IR/DIBuilder.cpp Fri Jun  7 13:35:53 2013
> >> @@ -209,7 +209,7 @@ DIEnumerator DIBuilder::createEnumerator
> >> }
> >>
> >> /// createNullPtrType - Create C++0x nullptr type.
> >> -DIType DIBuilder::createNullPtrType(StringRef Name) {
> >> +DIBasicType DIBuilder::createNullPtrType(StringRef Name) {
> >>   assert(!Name.empty() && "Unable to create type without name");
> >>   // nullptr is encoded in DIBasicType format. Line number, filename,
> >>   // ,size, alignment, offset and flags are always empty here.
> >> @@ -225,7 +225,7 @@ DIType DIBuilder::createNullPtrType(Stri
> >>     ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Flags;
> >>     ConstantInt::get(Type::getInt32Ty(VMContext), 0)  // Encoding
> >>   };
> >> -  return DIType(MDNode::get(VMContext, Elts));
> >> +  return DIBasicType(MDNode::get(VMContext, Elts));
> >> }
> >>
> >> /// createBasicType - Create debugging information entry for a basic
> >> @@ -350,7 +350,7 @@ DIDerivedType DIBuilder::createTypedef(D
> >> }
> >>
> >> /// createFriend - Create debugging information entry for a 'friend'.
> >> -DIType DIBuilder::createFriend(DIType Ty, DIType FriendTy) {
> >> +DIDerivedType DIBuilder::createFriend(DIType Ty, DIType FriendTy) {
> >>   // typedefs are encoded in DIDerivedType format.
> >>   assert(Ty.Verify() && "Invalid type!");
> >>   assert(FriendTy.Verify() && "Invalid friend type!");
> >> @@ -366,7 +366,7 @@ DIType DIBuilder::createFriend(DIType Ty
> >>     ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Flags
> >>     FriendTy
> >>   };
> >> -  return DIType(MDNode::get(VMContext, Elts));
> >> +  return DIDerivedType(MDNode::get(VMContext, Elts));
> >> }
> >>
> >> /// createInheritance - Create debugging information entry to establish
> >> @@ -413,10 +413,11 @@ DIDerivedType DIBuilder::createMemberTyp
> >>
> >> /// createStaticMemberType - Create debugging information entry for a
> >> /// C++ static data member.
> >> -DIType DIBuilder::createStaticMemberType(DIDescriptor Scope, StringRef
> Name,
> >> -                                         DIFile File, unsigned
> LineNumber,
> >> -                                         DIType Ty, unsigned Flags,
> >> -                                         llvm::Value *Val) {
> >> +DIDerivedType
> >> +DIBuilder::createStaticMemberType(DIDescriptor Scope, StringRef Name,
> >> +                                  DIFile File, unsigned LineNumber,
> >> +                                  DIType Ty, unsigned Flags,
> >> +                                  llvm::Value *Val) {
> >>   // TAG_member is encoded in DIDerivedType format.
> >>   Flags |= DIDescriptor::FlagStaticMember;
> >>   Value *Elts[] = {
> >> @@ -432,18 +433,19 @@ DIType DIBuilder::createStaticMemberType
> >>     Ty,
> >>     Val
> >>   };
> >> -  return DIType(MDNode::get(VMContext, Elts));
> >> +  return DIDerivedType(MDNode::get(VMContext, 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) {
> >> +DIDerivedType
> >> +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),
> >> @@ -461,16 +463,17 @@ DIType DIBuilder::createObjCIVar(StringR
> >>     MDString::get(VMContext, SetterName),
> >>     ConstantInt::get(Type::getInt32Ty(VMContext), PropertyAttributes)
> >>   };
> >> -  return DIType(MDNode::get(VMContext, Elts));
> >> +  return DIDerivedType(MDNode::get(VMContext, 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, MDNode *PropertyNode) {
> >> +DIDerivedType
> >> +DIBuilder::createObjCIVar(StringRef Name,
> >> +                          DIFile File, unsigned LineNumber,
> >> +                          uint64_t SizeInBits, uint64_t AlignInBits,
> >> +                          uint64_t OffsetInBits, unsigned Flags,
> >> +                          DIType Ty, MDNode *PropertyNode) {
> >>   // TAG_member is encoded in DIDerivedType format.
> >>   Value *Elts[] = {
> >>     GetTagConstant(VMContext, dwarf::DW_TAG_member),
> >> @@ -485,7 +488,7 @@ DIType DIBuilder::createObjCIVar(StringR
> >>     Ty,
> >>     PropertyNode
> >>   };
> >> -  return DIType(MDNode::get(VMContext, Elts));
> >> +  return DIDerivedType(MDNode::get(VMContext, Elts));
> >> }
> >>
> >> /// createObjCProperty - Create debugging information entry for
> Objective-C
> >>
> >>
> >> _______________________________________________
> >> llvm-commits mailing list
> >> llvm-commits at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130607/01a9c0f9/attachment.html>


More information about the llvm-commits mailing list