File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -253,12 +253,18 @@ TypeRefBuilder::getBuiltinTypeInfo(const TypeRef *TR) {
253
253
254
254
for (auto Info : ReflectionInfos) {
255
255
for (auto BuiltinTypeDescriptor : Info.Builtin ) {
256
- if (BuiltinTypeDescriptor->getAlignment () <= 0 )
257
- continue ;
258
256
if (BuiltinTypeDescriptor->Stride <= 0 )
259
257
continue ;
260
258
if (!BuiltinTypeDescriptor->hasMangledTypeName ())
261
259
continue ;
260
+
261
+ auto Alignment = BuiltinTypeDescriptor->getAlignment ();
262
+ if (Alignment <= 0 )
263
+ continue ;
264
+ // Reject any alignment that's not a power of two.
265
+ if (Alignment & (Alignment - 1 ))
266
+ continue ;
267
+
262
268
auto CandidateMangledName =
263
269
readTypeRef (BuiltinTypeDescriptor, BuiltinTypeDescriptor->TypeName );
264
270
if (!reflectionNameMatches (CandidateMangledName, MangledName))
You can’t perform that action at this time.
0 commit comments