mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-15 08:19:51 +00:00
![Xinliang David Li](/assets/img/avatar_default.png)
The file and buffer writer code are mostly shared except for the stream back-patching. This is because raw_string_ostream does not support seek like interface. The result is that the data patching code needs to be pushed to the caller which is not quite readable (passing around offset, value etc). This also makes future enhancement (which needs more patching) more difficult (and can make impl messy). In this patch, two types of streams needed by the writer are now unified with same set of interfaces under ProfOStream class. The patch method is added so that common implementation becomes cleaner. It also enables future enhancement. Should be NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257921 91177308-0d34-0410-b5e6-96231b3b80d8