[driver] Refactor getRuntimePaths. NFC
This used to be getRuntimePath till https://reviews.llvm.org/D115049 added a fallback search path for Android. As far as I can tell, the intent has always been to use the first existing path though instead of actually supporting multiple runtime paths. We can move the existence checks into getRuntimePath and have it return std::optional, which also makes the `--print-runtime-dir` behavior much cleaner. The motivation is a follow-up change to Android runtime path searches, which is much nicer with this in place. Reviewed By: phosek, MaskRay Differential Revision: https://reviews.llvm.org/D158475
Loading
Please sign in to comment