[CodeView] Unions are always sealed

It is impossible to inherit from a union.  We are missing a way to
represent this in IR for classes/structs...

llvm-svn: 274675
This commit is contained in:
David Majnemer 2016-07-06 21:07:42 +00:00
parent 6f9d01bbd5
commit e1e7372e93
2 changed files with 3 additions and 2 deletions

View File

@ -1536,7 +1536,7 @@ TypeIndex CodeViewDebug::lowerTypeUnion(const DICompositeType *Ty) {
}
TypeIndex CodeViewDebug::lowerCompleteTypeUnion(const DICompositeType *Ty) {
ClassOptions CO = getCommonClassOptions(Ty);
ClassOptions CO = ClassOptions::Sealed | getCommonClassOptions(Ty);
TypeIndex FieldTI;
unsigned FieldCount;
bool ContainsNestedClass;

View File

@ -161,8 +161,9 @@
; CHECK: Union (0x100B) {
; CHECK: TypeLeafKind: LF_UNION (0x1506)
; CHECK: MemberCount: 2
; CHECK: Properties [ (0x200)
; CHECK: Properties [ (0x600)
; CHECK: HasUniqueName (0x200)
; CHECK: Sealed (0x400)
; CHECK: ]
; CHECK: FieldList: <field list> (0x100A)
; CHECK: SizeOf: 4