diff options
author | Manman Ren <mren@apple.com> | 2013-06-07 18:35:53 +0000 |
---|---|---|
committer | Manman Ren <mren@apple.com> | 2013-06-07 18:35:53 +0000 |
commit | 576d49a775043931d81bba172b9b11f40d858cb6 (patch) | |
tree | 2e1c43f66a63de140599e50aa760543cd40987a8 /lib/IR/DIBuilder.cpp | |
parent | 2e0cebd8817bb8bd61a23597bcae6bab9b2845a6 (diff) | |
download | external_llvm-576d49a775043931d81bba172b9b11f40d858cb6.zip external_llvm-576d49a775043931d81bba172b9b11f40d858cb6.tar.gz external_llvm-576d49a775043931d81bba172b9b11f40d858cb6.tar.bz2 |
DIBuilder: No functionality change.
Use the correct DIType when creating types in DIBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183543 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/DIBuilder.cpp')
-rw-r--r-- | lib/IR/DIBuilder.cpp | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp index 2abf71b..6c274da 100644 --- a/lib/IR/DIBuilder.cpp +++ b/lib/IR/DIBuilder.cpp @@ -209,7 +209,7 @@ DIEnumerator DIBuilder::createEnumerator(StringRef Name, uint64_t Val) { } /// 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(StringRef Name) { 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(DIType Ty, StringRef Name, DIFile File, } /// 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, DIType FriendTy) { 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::createMemberType( /// 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(DIDescriptor Scope, StringRef Name, 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(StringRef Name, 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(StringRef Name, Ty, PropertyNode }; - return DIType(MDNode::get(VMContext, Elts)); + return DIDerivedType(MDNode::get(VMContext, Elts)); } /// createObjCProperty - Create debugging information entry for Objective-C |