This commit is contained in:
parent
c45dddae5f
commit
7f349c73db
16 changed files with 88 additions and 46 deletions
|
|
@ -2045,8 +2045,15 @@ Block& Builder::makeNewBlock()
|
|||
|
||||
Builder::LoopBlocks& Builder::makeNewLoop()
|
||||
{
|
||||
// Older MSVC versions don't allow inlining of blocks below.
|
||||
LoopBlocks blocks = {makeNewBlock(), makeNewBlock(), makeNewBlock(), makeNewBlock()};
|
||||
// This verbosity is needed to simultaneously get the same behavior
|
||||
// everywhere (id's in the same order), have a syntax that works
|
||||
// across lots of versions of C++, have no warnings from pedantic
|
||||
// compilation modes, and leave the rest of the code alone.
|
||||
Block& head = makeNewBlock();
|
||||
Block& body = makeNewBlock();
|
||||
Block& merge = makeNewBlock();
|
||||
Block& continue_target = makeNewBlock();
|
||||
LoopBlocks blocks(head, body, merge, continue_target);
|
||||
loops.push(blocks);
|
||||
return loops.top();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue