DebugInfo: Don't include size/alignment on class declarations

This seems like it must've been a leftover by accident - no tests were
backing it up & it doesn't make much sense to include size/alignment on
class declarations (it'd only be on those declarations for which the
definition was available - otherwise the size/alignment would not be
known).

llvm-svn: 290631
This commit is contained in:
David Blaikie 2016-12-27 22:05:35 +00:00
parent 5cc08f865b
commit deeca6de08
2 changed files with 1 additions and 6 deletions

View File

@ -775,12 +775,6 @@ CGDebugInfo::getOrCreateRecordFwdDecl(const RecordType *Ty,
uint64_t Size = 0;
uint32_t Align = 0;
const RecordDecl *D = RD->getDefinition();
if (D && D->isCompleteDefinition()) {
Size = CGM.getContext().getTypeSize(Ty);
Align = getDeclAlignIfRequired(D, CGM.getContext());
}
// Create the type.
SmallString<256> FullName = getUniqueTagTypeName(Ty, CGM, TheCU);
llvm::DICompositeType *RetTy = DBuilder.createReplaceableCompositeType(

View File

@ -122,6 +122,7 @@ int main(int argc, char **argv) {
// CHECK: [[C_DTOR]] = !DISubprogram(name: "~C"
// CHECK: [[D:![0-9]+]] = !DICompositeType(tag: DW_TAG_structure_type, name: "D"
// CHECK-NOT: size:
// CHECK-SAME: DIFlagFwdDecl
// CHECK-SAME: identifier: "_ZTS1D"
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "E"