diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2018-03-09 01:09:58 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2018-03-09 01:09:58 +0000 |
commit | 311735dbc6783b8669850b0b882834bd41a4e1f1 (patch) | |
tree | 8501e89c1ac01bf8dd5824c58c4140fc0e204e54 /gcc/tree-if-conv.c | |
parent | 0bfd8ca928bacfe66700b28976c903d1fe46fbe5 (diff) | |
download | gcc-311735dbc6783b8669850b0b882834bd41a4e1f1.zip gcc-311735dbc6783b8669850b0b882834bd41a4e1f1.tar.gz gcc-311735dbc6783b8669850b0b882834bd41a4e1f1.tar.bz2 |
Use non-throwing is_directory in filesystem::create_directory
The create_dir helper was calling the throwing form of
filesystem::is_directory instead of passing the error_code argument.
Since std::filesystem::create_directory(const path&, error_code&) is
noexcept, it would call std::terminate if an error occurred in
is_directory.
Passing the error_code also takes care of clearing it in the case where
is_directory returns true.
src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
src/filesystem/std-ops.cc (create_dir): Likewise.
From-SVN: r258375
Diffstat (limited to 'gcc/tree-if-conv.c')
0 files changed, 0 insertions, 0 deletions