This patch adds the ability to add a message to a progress event update.
Consider the following example as motivation. Say you have to load symbols for 3 dynamic libraries: libFoo, libBar, libBaz. Currently, there are two ways to report this:
- As 3 separate progress instances. In this case you create a progress instance with the message "Loading symbols: libFoo", ""Loading symbols: libBar", and "Loading symbols: libBaz" respectively. If the operations are completely separate, i.e. they belong to different modules, this approach makes sense. This is what we do for parsing the symbol table, loading the dwarf index, etc.
- As 1 progress instance with 3 units of work. This is the preferred approach is you know the number of units of work in advance, because you can report determinate progress. The title would be "Loading symbols" and you call Progress::Increment for each of the libraries. Note that with the current design, there's no way to include the name of the libraries, which is what this patch addresses.
Are these going to be needed in a follow up?