File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -49,10 +49,10 @@ enum class StructTypeInfoKind {
49
49
FixedStructTypeInfo,
50
50
ClangRecordTypeInfo,
51
51
NonFixedStructTypeInfo,
52
+ ResilientStructTypeInfo
52
53
};
53
54
54
55
static StructTypeInfoKind getStructTypeInfoKind (const TypeInfo &type) {
55
- // FIXME: check that this is not a resilient struct type
56
56
return (StructTypeInfoKind) type.getSubclassKind ();
57
57
}
58
58
@@ -718,6 +718,8 @@ class ClangRecordLowering {
718
718
return structTI.as <FixedStructTypeInfo>().op (IGF, __VA_ARGS__); \
719
719
case StructTypeInfoKind::NonFixedStructTypeInfo: \
720
720
return structTI.as <NonFixedStructTypeInfo>().op (IGF, __VA_ARGS__); \
721
+ case StructTypeInfoKind::ResilientStructTypeInfo: \
722
+ llvm_unreachable (" resilient structs are opaque" ); \
721
723
} \
722
724
llvm_unreachable (" bad struct type info kind!" ); \
723
725
} while (0 )
@@ -758,7 +760,9 @@ namespace {
758
760
{
759
761
public:
760
762
ResilientStructTypeInfo (llvm::Type *T)
761
- : ResilientTypeInfo(T) { }
763
+ : ResilientTypeInfo(T) {
764
+ setSubclassKind ((unsigned ) StructTypeInfoKind::ResilientStructTypeInfo);
765
+ }
762
766
};
763
767
}
764
768
You can’t perform that action at this time.
0 commit comments