Allowing instructions to be added after a terminator just invites trouble later. Better to assert early, so the bug is easy to spot.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 30436 Build 30435: arc lint + arc unit
Event Timeline
Comment Actions
FWIW, I picked reviewers by taking the last two people who changed the file. I hope reviewing this isn't too much of an inconvenience ;)
Comment Actions
Thanks for working on this. Two thoughts:
- Would the old test fail with the new assert? I don’t yet see why it would.
- Might help to preemptively test this with a stage 2 clang self-host, in case any in-tree code “fixes up” extra terminators.
Comment Actions
The old test did break, yes, that's why I changed it at all. The six branch instructions I moved down were all followed by phi nodes.
I'll start a clang rebuild one night. Haven't done it yet.