Bug spotted by https://cookieplmonster.github.io/2020/02/01/emulator-bug-llvm-bug/
The blog post proposes a simple solution (using a std::deque instead of a smallvector to store section entries). They also propose an alternative, namely to avoid taking any section reference at all. This patch enforces the latter using a proxy class. I'm totally fine with the dequeue approach too, and will gladly update the patch if needed.
How come SectionEntryProxy is sometimes passed by reference, but other times passed by value to different functions in this CL?