diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-10-05 01:49:14 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-10-05 01:49:14 +0000 |
commit | c6c86c43f9fe33e50428d0f08fc6dd44c85fa2e2 (patch) | |
tree | f335fc7a2a53d245f85a5428c2fed8567d5adf50 /llvm/lib/VMCore/DIBuilder.cpp | |
parent | 847ad4460ad0b83fca526a6b6e3ddc5b9068dd8c (diff) | |
download | bcm5719-llvm-c6c86c43f9fe33e50428d0f08fc6dd44c85fa2e2.tar.gz bcm5719-llvm-c6c86c43f9fe33e50428d0f08fc6dd44c85fa2e2.zip |
Make sure to generate the right kind of MDNode for enum forward declarations.
PR14029, LLVM part.
llvm-svn: 165288
Diffstat (limited to 'llvm/lib/VMCore/DIBuilder.cpp')
-rw-r--r-- | llvm/lib/VMCore/DIBuilder.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/VMCore/DIBuilder.cpp b/llvm/lib/VMCore/DIBuilder.cpp index 6a29a02399b..c331304df10 100644 --- a/llvm/lib/VMCore/DIBuilder.cpp +++ b/llvm/lib/VMCore/DIBuilder.cpp @@ -550,7 +550,7 @@ DIType DIBuilder::createEnumerationType(DIDescriptor Scope, StringRef Name, uint64_t SizeInBits, uint64_t AlignInBits, DIArray Elements, - DIType ClassType, unsigned Flags) { + DIType ClassType) { // TAG_enumeration_type is encoded in DICompositeType format. Value *Elts[] = { GetTagConstant(VMContext, dwarf::DW_TAG_enumeration_type), @@ -561,7 +561,7 @@ DIType DIBuilder::createEnumerationType(DIDescriptor Scope, StringRef Name, ConstantInt::get(Type::getInt64Ty(VMContext), SizeInBits), ConstantInt::get(Type::getInt64Ty(VMContext), AlignInBits), ConstantInt::get(Type::getInt32Ty(VMContext), 0), - ConstantInt::get(Type::getInt32Ty(VMContext), Flags), + ConstantInt::get(Type::getInt32Ty(VMContext), 0), ClassType, Elements, ConstantInt::get(Type::getInt32Ty(VMContext), 0), @@ -706,7 +706,9 @@ DIType DIBuilder::createTemporaryType(DIFile F) { /// can be RAUW'd if the full type is seen. DIType DIBuilder::createForwardDecl(unsigned Tag, StringRef Name, DIDescriptor Scope, DIFile F, - unsigned Line, unsigned RuntimeLang) { + unsigned Line, unsigned RuntimeLang, + uint64_t SizeInBits, + uint64_t AlignInBits) { // Create a temporary MDNode. Value *Elts[] = { GetTagConstant(VMContext, Tag), @@ -714,9 +716,8 @@ DIType DIBuilder::createForwardDecl(unsigned Tag, StringRef Name, MDString::get(VMContext, Name), F, ConstantInt::get(Type::getInt32Ty(VMContext), Line), - // To ease transition include sizes etc of 0. - ConstantInt::get(Type::getInt32Ty(VMContext), 0), - ConstantInt::get(Type::getInt32Ty(VMContext), 0), + ConstantInt::get(Type::getInt64Ty(VMContext), SizeInBits), + ConstantInt::get(Type::getInt64Ty(VMContext), AlignInBits), ConstantInt::get(Type::getInt32Ty(VMContext), 0), ConstantInt::get(Type::getInt32Ty(VMContext), DIDescriptor::FlagFwdDecl), |