Transition InstrProf and Coverage over to the stricter Error/Expected interface.
This has several advantages:
- It's impossible to ignore hard errors.
- It's impossible to ignore breakages in code that *usually* returns "success" values.
- It's easier to set breakpoints on specific error conditions (e.g, in the relevant ErrorInfoBase constructor), because we no longer create errors by returning raw enum values.
The only disadvantage I'm aware of is that in the event of an actual error, there is a malloc required.
This patch is motivated by my experiences with maintaining the swift compiler's code coverage functionality. Having stricter error checking would have helped us catch multiple bugs at testing time. Certain hard errors triggered by upstream changes wouldn't have been silently ignored.
I apologize for the large diff (thankfully it's very mechanical). Once I converted InstrProf, I had a hard time getting the Coverage code to work without converting it as well. Since there is no SampleProf <- InstrProf dependency, I will deal with it in a separate patch.
no need for this overrider.