mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-07 10:26:06 +00:00

Previously, we just used the platform name. This worked mostly OK, but it required adding special handling for any unusual (and potentially downstream) platform plugins, as evidenced by the hardcoding of the qemu-user platform. The current implementation was added in D121605/21c5bb0a636c23ec75b13681c0a6fdb03ecd9c0d, which this essentially reverts and goes back to the previous method of retrieving the platform name from the platform triple (the "OS" field). The motivation for D121605 was the ability to retrieve the process without constructing an SBDebugger object (which would be necessary in a world where SBPlatforms are managed by SBDebuggers). However, this world did not arrive (mainly due to other commitments on my part), and I now think that if we do want to go in that direction, that we should just create a dummy/empty SBDebugger object for holding the initial SBPlatform. One benefit of D121605 was the unification of getPlatform and getHostPlatform code paths, and I preserve that benefit by unifying them in the other direction -- using the host SBPlatform for getHostPlatform. Differential Revision: https://reviews.llvm.org/D138430