Revert "Merge pull request #40356 from gmittert/TypeLayoutFixes"

This reverts commit d27e6e1e46, reversing
changes made to f2e85a2b1f.

It causes an execution time failure in
`Interpreter/struct_extra_inhabitants.swift` with

```
ninja -C swift-macosx-x86_64 check-swift-optimize
```

rdar://86054209
This commit is contained in:
Arnold Schwaighofer
2021-12-06 07:42:58 -08:00
parent 591fc4abfd
commit 5c9de9e656
19 changed files with 151 additions and 795 deletions

View File

@@ -235,7 +235,7 @@ namespace {
TypeLayoutEntry *buildTypeLayoutEntry(IRGenModule &IGM,
SILType T) const override {
if (!IGM.getOptions().ForceStructTypeLayouts) {
return IGM.typeLayoutCache.getOrCreateTypeInfoBasedEntry(*this, T);
return IGM.typeLayoutCache.getOrCreateScalarEntry(*this, T);
}
if (getFields().empty()) {
return IGM.typeLayoutCache.getEmptyEntry();
@@ -280,7 +280,7 @@ namespace {
TypeLayoutEntry *buildTypeLayoutEntry(IRGenModule &IGM,
SILType T) const override {
if (!IGM.getOptions().ForceStructTypeLayouts) {
return IGM.typeLayoutCache.getOrCreateTypeInfoBasedEntry(*this, T);
return IGM.typeLayoutCache.getOrCreateScalarEntry(*this, T);
}
if (getFields().empty()) {
return IGM.typeLayoutCache.getEmptyEntry();