]> git.ipfire.org Git - thirdparty/gcc.git/commit
Optimize filesystem::path::parent_path()
authorJonathan Wakely <jwakely@redhat.com>
Fri, 14 Jun 2019 18:11:17 +0000 (19:11 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 14 Jun 2019 18:11:17 +0000 (19:11 +0100)
commit873557820764285a4b8da2d86333c26913449740
tree02ad4ae6ae283e1e2ca50fd8ce670b4ea86e42d2
parent16eb07fd34e08a0dcef125470ad860e9021f8155
Optimize filesystem::path::parent_path()

Parsing a complete string is more efficient than appending each
component one-by-one.

Backport from mainline
2019-05-29  Jonathan Wakely  <jwakely@redhat.com>

* src/c++17/fs_path.cc (path::parent_path()): Create whole path at
once instead of building it iteratively.

From-SVN: r272303
libstdc++-v3/ChangeLog
libstdc++-v3/src/c++17/fs_path.cc