summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp2
-rw-r--r--llvm/test/DebugInfo/COFF/types-data-members.ll3
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
index fe63b7043c5..cb4310836dd 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -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;
diff --git a/llvm/test/DebugInfo/COFF/types-data-members.ll b/llvm/test/DebugInfo/COFF/types-data-members.ll
index 70a509714b6..759a5e54644 100644
--- a/llvm/test/DebugInfo/COFF/types-data-members.ll
+++ b/llvm/test/DebugInfo/COFF/types-data-members.ll
@@ -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
OpenPOWER on IntegriCloud