mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-04 16:41:43 +00:00

This patch introduces FileSpec::GetComponents, a method that splits a FileSpec's path into its individual components. For example, given /foo/bar/baz, you'll get back a vector of strings {"foo", "bar", baz"}. The motivation here is to reduce the use of `FileSpec::RemoveLastPathComponent`. Mutating a FileSpec is expensive, so providing a way of doing this without mutation is useful. Differential Revision: https://reviews.llvm.org/D151399