diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-09-11 10:45:21 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-09-11 10:45:21 +0000 |
commit | f37a324baa7f3893111827f03959fc036da1ed23 (patch) | |
tree | c5bb21098432c9f2475dcab1abb76dc3d721f481 /include | |
parent | ece929d6234b73ea248b7a5e89f915613ad748ea (diff) | |
download | external_llvm-f37a324baa7f3893111827f03959fc036da1ed23.zip external_llvm-f37a324baa7f3893111827f03959fc036da1ed23.tar.gz external_llvm-f37a324baa7f3893111827f03959fc036da1ed23.tar.bz2 |
Path: Add an in-place version of path::native.
This reflects the common use case of nativizing a prepared path. The existing
version invokes undefined behavior if input = output, add an assert to catch
that case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190510 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/Path.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Support/Path.h b/include/llvm/Support/Path.h index f9a65e5..b2afe1b 100644 --- a/include/llvm/Support/Path.h +++ b/include/llvm/Support/Path.h @@ -173,6 +173,13 @@ void append(SmallVectorImpl<char> &path, /// @param result Holds the result of the transformation. void native(const Twine &path, SmallVectorImpl<char> &result); +/// Convert path to the native form in place. This is used to give paths to +/// users and operating system calls in the platform's normal way. For example, +/// on Windows all '/' are converted to '\'. +/// +/// @param path A path that is transformed to native format. +void native(SmallVectorImpl<char> &path); + /// @} /// @name Lexical Observers /// @{ |