aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2021-10-25 14:09:14 +0100
committerJeremy Morse <jeremy.morse@sony.com>2021-10-25 14:16:30 +0100
commit2eb96e1711bf6ae03351c7ba9d7ce8a40f6aa21c (patch)
tree56ccacf82d56bef1de7b7e457eaadbd279c05d7e /llvm/lib/CodeGen/MachineFunction.cpp
parent333c36bec09a954b59ceb01e21f1525f17530ec0 (diff)
downloadllvm-2eb96e1711bf6ae03351c7ba9d7ce8a40f6aa21c.zip
llvm-2eb96e1711bf6ae03351c7ba9d7ce8a40f6aa21c.tar.gz
llvm-2eb96e1711bf6ae03351c7ba9d7ce8a40f6aa21c.tar.bz2
[DebugInfo][NFC] Avoid a use-after-free
This patch swaps two lines -- the CurSucc reference can be invalidated by the call to DFS.push_back, therefore that should happen last. The usual hat-tip to asan for catching this. This patch also swaps an ealier call to ToAdd.insert and DFS.push_back, where a stable iterator (from successors()) is being used. This isn't strictly necessary, but is good for consistency and avoiding readers asking themselves why the two code portions have a different order.
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions