Skip to content

Commit 28fd4c4

Browse files
authored
Merge pull request #13294 from shajrawi/lowered_sil
2 parents bf21524 + cb33716 commit 28fd4c4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/IRGen/LoadableByAddress.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2499,11 +2499,14 @@ void LoadableByAddress::updateLoweredTypes(SILFunction *F) {
24992499

25002500
/// The entry point to this function transformation.
25012501
void LoadableByAddress::run() {
2502+
// Set the SIL state before the PassManager has a chance to run
2503+
// verification.
2504+
getModule()->setStage(SILStage::Lowered);
2505+
25022506
for (auto &F : *getModule())
25032507
runOnFunction(&F);
25042508

25052509
if (modFuncs.empty()) {
2506-
getModule()->setStage(SILStage::Lowered);
25072510
return;
25082511
}
25092512

@@ -2643,10 +2646,6 @@ void LoadableByAddress::run() {
26432646
// Fix all instructions that rely on block storage type
26442647
fixStoreToBlockStorageInstrs();
26452648

2646-
// Set the SIL state before the PassManager has a chance to run
2647-
// verification.
2648-
getModule()->setStage(SILStage::Lowered);
2649-
26502649
// Clean up the data structs:
26512650
modFuncs.clear();
26522651
conversionInstrs.clear();

0 commit comments

Comments
 (0)