[llvm] r274675 - [CodeView] Unions are always sealed
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 6 14:07:42 PDT 2016
Author: majnemer
Date: Wed Jul 6 16:07:42 2016
New Revision: 274675
URL: http://llvm.org/viewvc/llvm-project?rev=274675&view=rev
Log:
[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...
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
llvm/trunk/test/DebugInfo/COFF/types-data-members.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp?rev=274675&r1=274674&r2=274675&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp Wed Jul 6 16:07:42 2016
@@ -1536,7 +1536,7 @@ TypeIndex CodeViewDebug::lowerTypeUnion(
}
TypeIndex CodeViewDebug::lowerCompleteTypeUnion(const DICompositeType *Ty) {
- ClassOptions CO = getCommonClassOptions(Ty);
+ ClassOptions CO = ClassOptions::Sealed | getCommonClassOptions(Ty);
TypeIndex FieldTI;
unsigned FieldCount;
bool ContainsNestedClass;
Modified: llvm/trunk/test/DebugInfo/COFF/types-data-members.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/types-data-members.ll?rev=274675&r1=274674&r2=274675&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/types-data-members.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/types-data-members.ll Wed Jul 6 16:07:42 2016
@@ -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
More information about the llvm-commits
mailing list