The methods to find types in a Target aren't clang specific and are
pretty generalizable to type systems. Additionally, to support some of
the use cases in SBTarget, I've added a "GetScratchTypeSystems" method
to Target to support getting all type systems for a target we are
debugging.
Details
Diff Detail
- Build Status
Buildable 35858 Build 35857: arc lint + arc unit
Event Timeline
This looks fine to me. Makes it really clear that we need SBTarget::FindFirstTypeForLanguage, etc. But FindFirstType was always a crapshoot anyway...
All uses of this new function drop the error on the ground. Does that mean it doesn't matter? If it does, should we return an expected instead? Should we stop on the first error, or is it fine to overwrite when iterating over languages_for_expressions? It seems like the error handling needs some more work here.
If you at the actual function GetScratchTypeSystemForLanguage, the error is completely unused. I think dropping the Status returning an llvm::Expected is probably the right thing to do. In that case, I don't think we should stop if GetScratchTypeSystemForLanguage returns a None value. I'll update this tomorrow.