mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-08 11:56:12 +03:00
gen: Keep case/default body IR blocks in lexical order [nfc]
This makes the IR slightly easier to read, in particular the PGO lit tests.
This commit is contained in:
parent
8fbb0ddbfa
commit
9d5bf5a707
3 changed files with 10 additions and 22 deletions
|
@ -1365,6 +1365,7 @@ public:
|
|||
PGO.setCurrentStmt(stmt);
|
||||
|
||||
const auto body = funcGen.switchTargets.getOrCreate(stmt, "case");
|
||||
body->moveAfter(irs->scopebb());
|
||||
|
||||
if (!irs->scopereturned()) {
|
||||
llvm::BranchInst::Create(body, irs->scopebb());
|
||||
|
@ -1393,6 +1394,7 @@ public:
|
|||
PGO.setCurrentStmt(stmt);
|
||||
|
||||
const auto body = funcGen.switchTargets.getOrCreate(stmt, "default");
|
||||
body->moveAfter(irs->scopebb());
|
||||
|
||||
if (!irs->scopereturned()) {
|
||||
llvm::BranchInst::Create(body, irs->scopebb());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue