diff options
author | Adrian McCarthy <amccarth@google.com> | 2016-07-06 15:14:10 +0000 |
---|---|---|
committer | Adrian McCarthy <amccarth@google.com> | 2016-07-06 15:14:10 +0000 |
commit | 7649d8388a697e1cf9ad062ebdc8c85a47f56c5d (patch) | |
tree | 17f0a1ef3085b9e31d7fdb7f84f078b685ee9722 /llvm/lib | |
parent | 118da63a9dc6ed87366c4459714e9f7495f6542b (diff) | |
download | bcm5719-llvm-7649d8388a697e1cf9ad062ebdc8c85a47f56c5d.tar.gz bcm5719-llvm-7649d8388a697e1cf9ad062ebdc8c85a47f56c5d.zip |
Revert "Emit CodeView type records for nested classes."
This reverts commit 256b29322c827a2d94da56468c936596f5509032.
llvm-svn: 274632
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 34 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h | 2 |
2 files changed, 7 insertions, 29 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index fe63b7043c5..bd4df879d5f 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -1414,8 +1414,6 @@ struct llvm::ClassInfo { MemberList Members; // Direct overloaded methods gathered by name. MethodsMap Methods; - - std::vector<const DICompositeType *> NestedClasses; }; void CodeViewDebug::clear() { @@ -1468,8 +1466,8 @@ ClassInfo CodeViewDebug::collectClassInfo(const DICompositeType *Ty) { // friends in the past, but modern versions do not. } // FIXME: Get Clang to emit function virtual table here and handle it. - } else if (auto *Composite = dyn_cast<DICompositeType>(Element)) { - Info.NestedClasses.push_back(Composite); + // FIXME: Get clang to emit nested types here and do something with + // them. } // Skip other unrecognized kinds of elements. } @@ -1498,12 +1496,7 @@ TypeIndex CodeViewDebug::lowerCompleteTypeClass(const DICompositeType *Ty) { TypeIndex FieldTI; TypeIndex VShapeTI; unsigned FieldCount; - bool ContainsNestedClass; - std::tie(FieldTI, VShapeTI, FieldCount, ContainsNestedClass) = - lowerRecordFieldList(Ty); - - if (ContainsNestedClass) - CO |= ClassOptions::ContainsNestedClass; + std::tie(FieldTI, VShapeTI, FieldCount) = lowerRecordFieldList(Ty); std::string FullName = getFullyQualifiedName(Ty); @@ -1539,13 +1532,7 @@ TypeIndex CodeViewDebug::lowerCompleteTypeUnion(const DICompositeType *Ty) { ClassOptions CO = getCommonClassOptions(Ty); TypeIndex FieldTI; unsigned FieldCount; - bool ContainsNestedClass; - std::tie(FieldTI, std::ignore, FieldCount, ContainsNestedClass) = - lowerRecordFieldList(Ty); - - if (ContainsNestedClass) - CO |= ClassOptions::ContainsNestedClass; - + std::tie(FieldTI, std::ignore, FieldCount) = lowerRecordFieldList(Ty); uint64_t SizeInBytes = Ty->getSizeInBits() / 8; std::string FullName = getFullyQualifiedName(Ty); @@ -1563,7 +1550,7 @@ TypeIndex CodeViewDebug::lowerCompleteTypeUnion(const DICompositeType *Ty) { return UnionTI; } -std::tuple<TypeIndex, TypeIndex, unsigned, bool> +std::tuple<TypeIndex, TypeIndex, unsigned> CodeViewDebug::lowerRecordFieldList(const DICompositeType *Ty) { // Manually count members. MSVC appears to count everything that generates a // field list record. Each individual overload in a method overload group @@ -1658,17 +1645,8 @@ CodeViewDebug::lowerRecordFieldList(const DICompositeType *Ty) { OverloadedMethodRecord(Methods.size(), MethodList, Name)); } } - - // Create nested classes. - for (const DICompositeType *Nested : Info.NestedClasses) { - NestedTypeRecord R(getTypeIndex(DITypeRef(Nested)), Nested->getName()); - Fields.writeNestedType(R); - MemberCount++; - } - TypeIndex FieldTI = TypeTable.writeFieldList(Fields); - return std::make_tuple(FieldTI, TypeIndex(), MemberCount, - !Info.NestedClasses.empty()); + return std::make_tuple(FieldTI, TypeIndex(), MemberCount); } TypeIndex CodeViewDebug::getVBPTypeIndex() { diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h index 31da1b11fa4..51dd5df1027 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h @@ -275,7 +275,7 @@ class LLVM_LIBRARY_VISIBILITY CodeViewDebug : public DebugHandlerBase { /// Common record member lowering functionality for record types, which are /// structs, classes, and unions. Returns the field list index and the member /// count. - std::tuple<codeview::TypeIndex, codeview::TypeIndex, unsigned, bool> + std::tuple<codeview::TypeIndex, codeview::TypeIndex, unsigned> lowerRecordFieldList(const DICompositeType *Ty); /// Inserts {{Node, ClassTy}, TI} into TypeIndices and checks for duplicates. |