@@ -993,14 +993,14 @@ struct TransformDFA {
993993 SmallPtrSet<BasicBlock *, 16 > BlocksToClean;
994994 BlocksToClean.insert_range (successors (SwitchBlock));
995995
996- for (ThreadingPath &TPath : SwitchPaths->getThreadingPaths ()) {
996+ for (const ThreadingPath &TPath : SwitchPaths->getThreadingPaths ()) {
997997 createExitPath (NewDefs, TPath, DuplicateMap, BlocksToClean, &DTU);
998998 NumPaths++;
999999 }
10001000
10011001 // After all paths are cloned, now update the last successor of the cloned
10021002 // path so it skips over the switch statement
1003- for (ThreadingPath &TPath : SwitchPaths->getThreadingPaths ())
1003+ for (const ThreadingPath &TPath : SwitchPaths->getThreadingPaths ())
10041004 updateLastSuccessor (TPath, DuplicateMap, &DTU);
10051005
10061006 // For each instruction that was cloned and used outside, update its uses
@@ -1017,7 +1017,7 @@ struct TransformDFA {
10171017 // / To remember the correct destination, we have to duplicate blocks
10181018 // / corresponding to each state. Also update the terminating instruction of
10191019 // / the predecessors, and phis in the successor blocks.
1020- void createExitPath (DefMap &NewDefs, ThreadingPath &Path,
1020+ void createExitPath (DefMap &NewDefs, const ThreadingPath &Path,
10211021 DuplicateBlockMap &DuplicateMap,
10221022 SmallPtrSet<BasicBlock *, 16 > &BlocksToClean,
10231023 DomTreeUpdater *DTU) {
@@ -1263,7 +1263,7 @@ struct TransformDFA {
12631263 // /
12641264 // / Note that this is an optional step and would have been done in later
12651265 // / optimizations, but it makes the CFG significantly easier to work with.
1266- void updateLastSuccessor (ThreadingPath &TPath,
1266+ void updateLastSuccessor (const ThreadingPath &TPath,
12671267 DuplicateBlockMap &DuplicateMap,
12681268 DomTreeUpdater *DTU) {
12691269 APInt NextState = TPath.getExitValue ();
0 commit comments