[libcxx] Implement append and operator/ properly for windows

The root_path function has to be changed to return the parsed bit
as-is; otherwise a path like "//net" gets a root path of "//net/", as
the root name, "//net", gets the root directory (an empty string) appended,
forming "//net/". (The same doesn't happen for the root dir "c:" though.)

Differential Revision: https://reviews.llvm.org/D91178

GitOrigin-RevId: 78d693faecf98718dadfa6e39f291e5999f380c7
2 files changed