LLVM 23.0.0git
Path.h
Go to the documentation of this file.
1//===- llvm/Support/Path.h - Path Operating System Concept ------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file declares the llvm::sys::path namespace. It is designed after
10// TR2/boost filesystem (v3), but modified to remove exception handling and the
11// path class.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_SUPPORT_PATH_H
16#define LLVM_SUPPORT_PATH_H
17
18#include "llvm/ADT/Twine.h"
19#include "llvm/ADT/iterator.h"
22#include <iterator>
23
24namespace llvm {
25namespace sys {
26namespace path {
27
35
36/// Check if \p S uses POSIX path rules.
37constexpr bool is_style_posix(Style S) {
38 if (S == Style::posix)
39 return true;
40 if (S != Style::native)
41 return false;
42#if defined(_WIN32)
43 return false;
44#else
45 return true;
46#endif
47}
48
49/// Check if \p S uses Windows path rules.
50constexpr bool is_style_windows(Style S) { return !is_style_posix(S); }
51
52/// @name Lexical Component Iterator
53/// @{
54
55/// Path iterator.
56///
57/// This is an input iterator that iterates over the individual components in
58/// \a path. The traversal order is as follows:
59/// * The root-name element, if present.
60/// * The root-directory element, if present.
61/// * Each successive filename element, if present.
62/// * Dot, if one or more trailing non-root slash characters are present.
63/// Traversing backwards is possible with \a reverse_iterator
64///
65/// Iteration examples. Each component is separated by ',':
66/// @code
67/// / => /
68/// /foo => /,foo
69/// foo/ => foo,.
70/// /foo/bar => /,foo,bar
71/// ../ => ..,.
72/// C:\foo\bar => C:,\,foo,bar
73/// @endcode
75 : public iterator_facade_base<const_iterator, std::input_iterator_tag,
76 const StringRef> {
77 StringRef Path; ///< The entire path.
78 StringRef Component; ///< The current component. Not necessarily in Path.
79 size_t Position = 0; ///< The iterators current position within Path.
80 Style S = Style::native; ///< The path style to use.
81
82 // An end iterator has Position = Path.size() + 1.
85
86public:
87 reference operator*() const { return Component; }
88 LLVM_ABI const_iterator &operator++(); // preincrement
89 LLVM_ABI bool operator==(const const_iterator &RHS) const;
90
91 /// Difference in bytes between this and RHS.
93};
94
95/// Reverse path iterator.
96///
97/// This is an input iterator that iterates over the individual components in
98/// \a path in reverse order. The traversal order is exactly reversed from that
99/// of \a const_iterator
101 : public iterator_facade_base<reverse_iterator, std::input_iterator_tag,
102 const StringRef> {
103 StringRef Path; ///< The entire path.
104 StringRef Component; ///< The current component. Not necessarily in Path.
105 size_t Position = 0; ///< The iterators current position within Path.
106 Style S = Style::native; ///< The path style to use.
107
110
111public:
112 reference operator*() const { return Component; }
113 LLVM_ABI reverse_iterator &operator++(); // preincrement
114 LLVM_ABI bool operator==(const reverse_iterator &RHS) const;
115
116 /// Difference in bytes between this and RHS.
118};
119
120/// Get begin iterator over \a path.
121/// @param path Input path.
122/// @returns Iterator initialized with the first component of \a path.
124 Style style = Style::native);
125
126/// Get end iterator over \a path.
127/// @param path Input path.
128/// @returns Iterator initialized to the end of \a path.
130
131/// Get reverse begin iterator over \a path.
132/// @param path Input path.
133/// @returns Iterator initialized with the first reverse component of \a path.
135 Style style = Style::native);
136
137/// Get reverse end iterator over \a path.
138/// @param path Input path.
139/// @returns Iterator initialized to the reverse end of \a path.
141
142/// @}
143/// @name Lexical Modifiers
144/// @{
145
146/// Remove the last component from \a path unless it is the root dir.
147///
148/// Similar to the POSIX "dirname" utility.
149///
150/// @code
151/// directory/filename.cpp => directory/
152/// directory/ => directory
153/// filename.cpp => <empty>
154/// / => /
155/// @endcode
156///
157/// @param path A path that is modified to not have a file component.
159 Style style = Style::native);
160
161/// Replace the file extension of \a path with \a extension.
162///
163/// @code
164/// ./filename.cpp => ./filename.extension
165/// ./filename => ./filename.extension
166/// ./ => ./.extension
167/// @endcode
168///
169/// @param path A path that has its extension replaced with \a extension.
170/// @param extension The extension to be added. It may be empty. It may also
171/// optionally start with a '.', if it does not, one will be
172/// prepended.
174 const Twine &extension,
175 Style style = Style::native);
176
177/// Replace matching path prefix with another path.
178///
179/// @code
180/// /foo, /old, /new => /foo
181/// /old, /old, /new => /new
182/// /old, /old/, /new => /old
183/// /old/foo, /old, /new => /new/foo
184/// /old/foo, /old/, /new => /new/foo
185/// /old/foo, /old/, /new/ => /new/foo
186/// /oldfoo, /old, /new => /oldfoo
187/// /foo, <empty>, /new => /new/foo
188/// /foo, <empty>, new => new/foo
189/// /old/foo, /old, <empty> => /foo
190/// @endcode
191///
192/// @param Path If \a Path starts with \a OldPrefix modify to instead
193/// start with \a NewPrefix.
194/// @param OldPrefix The path prefix to strip from \a Path.
195/// @param NewPrefix The path prefix to replace \a NewPrefix with.
196/// @param style The style used to match the prefix. Exact match using
197/// Posix style, case/separator insensitive match for Windows style.
198/// @result true if \a Path begins with OldPrefix
200 StringRef OldPrefix, StringRef NewPrefix,
201 Style style = Style::native);
202
203/// Remove redundant leading "./" pieces and consecutive separators.
204///
205/// @param path Input path.
206/// @result The cleaned-up \a path.
208 Style style = Style::native);
209
210/// Remove './' and optionally '../' components, and canonicalize separators.
211///
212/// @param path processed path.
213/// @param remove_dot_dot specify if '../' (except for leading "../") should be
214/// removed.
215/// @result True if path was changed.
217 bool remove_dot_dot = false,
218 Style style = Style::native);
219
220/// Append to path.
221///
222/// @code
223/// /foo + bar/f => /foo/bar/f
224/// /foo/ + bar/f => /foo/bar/f
225/// foo + bar/f => foo/bar/f
226/// foo + /bar/f => foo/bar/f (FIXME: will be changed to /bar/f to align
227/// with C++17 std::filesystem::path::append)
228/// @endcode
229///
230/// @param path Set to \a path + \a component.
231/// @param a The component to be appended to \a path.
233 const Twine &b = "", const Twine &c = "",
234 const Twine &d = "");
235
236LLVM_ABI void append(SmallVectorImpl<char> &path, Style style, const Twine &a,
237 const Twine &b = "", const Twine &c = "",
238 const Twine &d = "");
239
240/// Append to path.
241///
242/// @code
243/// /foo + [bar,f] => /foo/bar/f
244/// /foo/ + [bar,f] => /foo/bar/f
245/// foo + [bar,f] => foo/bar/f
246/// @endcode
247///
248/// @param path Set to \a path + [\a begin, \a end).
249/// @param begin Start of components to append.
250/// @param end One past the end of components to append.
253
254/// @}
255/// @name Transforms (or some other better name)
256/// @{
257
258/// Convert path to the native form. This is used to give paths to users and
259/// operating system calls in the platform's normal way. For example, on Windows
260/// all '/' are converted to '\'. On Unix, it converts all '\' to '/'.
261///
262/// @param path A path that is transformed to native format.
263/// @param result Holds the result of the transformation.
264LLVM_ABI void native(const Twine &path, SmallVectorImpl<char> &result,
265 Style style = Style::native);
266
267/// Convert path to the native form and return it as a std::string. This is used
268/// to give paths to users and operating system calls in the platform's normal
269/// way. For example, on Windows all '/' are converted to '\'. On Unix, it
270/// converts all '\' to '/'.
271///
272/// @param path A path that is transformed to native format.
273LLVM_ABI std::string native(const Twine &path, Style style = Style::native);
274
275/// Convert path to the native form in place. This is used to give paths to
276/// users and operating system calls in the platform's normal way. For example,
277/// on Windows all '/' are converted to '\'.
278///
279/// @param path A path that is transformed to native format.
281
282/// For Windows path styles, convert path to use the preferred path separators.
283/// For other styles, do nothing.
284///
285/// @param path A path that is transformed to preferred format.
287 Style style = Style::native) {
288 if (!is_style_windows(style))
289 return;
290 native(path, style);
291}
292
293/// Replaces backslashes with slashes if Windows.
294///
295/// @param path processed path
296/// @result The result of replacing backslashes with forward slashes if Windows.
297/// On Unix, this function is a no-op because backslashes are valid path
298/// chracters.
300 Style style = Style::native);
301
302/// @}
303/// @name Lexical Observers
304/// @{
305
306/// Get root name.
307///
308/// @code
309/// //net/hello => //net
310/// c:/hello => c: (on Windows, on other platforms nothing)
311/// /hello => <empty>
312/// @endcode
313///
314/// @param path Input path.
315/// @result The root name of \a path if it has one, otherwise "".
317 Style style = Style::native);
318
319/// Get root directory.
320///
321/// @code
322/// /goo/hello => /
323/// c:/hello => /
324/// d/file.txt => <empty>
325/// @endcode
326///
327/// @param path Input path.
328/// @result The root directory of \a path if it has one, otherwise
329/// "".
331 Style style = Style::native);
332
333/// Get root path.
334///
335/// Equivalent to root_name + root_directory.
336///
337/// @param path Input path.
338/// @result The root path of \a path if it has one, otherwise "".
340 Style style = Style::native);
341
342/// Get relative path.
343///
344/// @code
345/// C:\hello\world => hello\world
346/// foo/bar => foo/bar
347/// /foo/bar => foo/bar
348/// @endcode
349///
350/// @param path Input path.
351/// @result The path starting after root_path if one exists, otherwise "".
353 Style style = Style::native);
354
355/// Get parent path.
356///
357/// @code
358/// / => <empty>
359/// /foo => /
360/// foo/../bar => foo/..
361/// @endcode
362///
363/// @param path Input path.
364/// @result The parent path of \a path if one exists, otherwise "".
366 Style style = Style::native);
367
368/// Get filename.
369///
370/// @code
371/// /foo.txt => foo.txt
372/// . => .
373/// .. => ..
374/// / => /
375/// @endcode
376///
377/// @param path Input path.
378/// @result The filename part of \a path. This is defined as the last component
379/// of \a path. Similar to the POSIX "basename" utility.
381 Style style = Style::native);
382
383/// Get stem.
384///
385/// If filename contains a dot but not solely one or two dots, result is the
386/// substring of filename ending at (but not including) the last dot. Otherwise
387/// it is filename.
388///
389/// @code
390/// /foo/bar.txt => bar
391/// /foo/bar => bar
392/// /foo/.txt => <empty>
393/// /foo/. => .
394/// /foo/.. => ..
395/// @endcode
396///
397/// @param path Input path.
398/// @result The stem of \a path.
400 Style style = Style::native);
401
402/// Get extension.
403///
404/// If filename contains a dot but not solely one or two dots, result is the
405/// substring of filename starting at (and including) the last dot, and ending
406/// at the end of \a path. Otherwise "".
407///
408/// @code
409/// /foo/bar.txt => .txt
410/// /foo/bar => <empty>
411/// /foo/.txt => .txt
412/// @endcode
413///
414/// @param path Input path.
415/// @result The extension of \a path.
417 Style style = Style::native);
418
419/// Check whether the given char is a path separator on the host OS.
420///
421/// @param value a character
422/// @result true if \a value is a path separator character on the host OS
423LLVM_ABI bool is_separator(char value, Style style = Style::native);
424
425/// Return the preferred separator for this platform.
426///
427/// @result StringRef of the preferred separator, null-terminated.
429
430/// Get the typical temporary directory for the system, e.g.,
431/// "/var/tmp" or "C:/TEMP"
432///
433/// @param erasedOnReboot Whether to favor a path that is erased on reboot
434/// rather than one that potentially persists longer. This parameter will be
435/// ignored if the user or system has set the typical environment variable
436/// (e.g., TEMP on Windows, TMPDIR on *nix) to specify a temporary directory.
437///
438/// @param result Holds the resulting path name.
439LLVM_ABI void system_temp_directory(bool erasedOnReboot,
440 SmallVectorImpl<char> &result);
441
442/// Get the user's home directory.
443///
444/// @param result Holds the resulting path name.
445/// @result True if a home directory is set, false otherwise.
447
448/// Get the directory where packages should read user-specific configurations.
449/// e.g. $XDG_CONFIG_HOME.
450///
451/// @param result Holds the resulting path name.
452/// @result True if the appropriate path was determined, it need not exist.
454
455/// Get the directory where installed packages should put their
456/// machine-local cache, e.g. $XDG_CACHE_HOME.
457///
458/// @param result Holds the resulting path name.
459/// @result True if the appropriate path was determined, it need not exist.
461
462/// Has root name?
463///
464/// root_name != ""
465///
466/// @param path Input path.
467/// @result True if the path has a root name, false otherwise.
468LLVM_ABI bool has_root_name(const Twine &path, Style style = Style::native);
469
470/// Has root directory?
471///
472/// root_directory != ""
473///
474/// @param path Input path.
475/// @result True if the path has a root directory, false otherwise.
477 Style style = Style::native);
478
479/// Has root path?
480///
481/// root_path != ""
482///
483/// @param path Input path.
484/// @result True if the path has a root path, false otherwise.
485LLVM_ABI bool has_root_path(const Twine &path, Style style = Style::native);
486
487/// Has relative path?
488///
489/// relative_path != ""
490///
491/// @param path Input path.
492/// @result True if the path has a relative path, false otherwise.
494
495/// Has parent path?
496///
497/// parent_path != ""
498///
499/// @param path Input path.
500/// @result True if the path has a parent path, false otherwise.
502
503/// Has filename?
504///
505/// filename != ""
506///
507/// @param path Input path.
508/// @result True if the path has a filename, false otherwise.
509LLVM_ABI bool has_filename(const Twine &path, Style style = Style::native);
510
511/// Has stem?
512///
513/// stem != ""
514///
515/// @param path Input path.
516/// @result True if the path has a stem, false otherwise.
517LLVM_ABI bool has_stem(const Twine &path, Style style = Style::native);
518
519/// Has extension?
520///
521/// extension != ""
522///
523/// @param path Input path.
524/// @result True if the path has a extension, false otherwise.
525LLVM_ABI bool has_extension(const Twine &path, Style style = Style::native);
526
527/// Is path absolute?
528///
529/// According to cppreference.com, C++17 states: "An absolute path is a path
530/// that unambiguously identifies the location of a file without reference to
531/// an additional starting location."
532///
533/// In other words, the rules are:
534/// 1) POSIX style paths with nonempty root directory are absolute.
535/// 2) Windows style paths with nonempty root name and root directory are
536/// absolute.
537/// 3) No other paths are absolute.
538///
539/// \see has_root_name
540/// \see has_root_directory
541///
542/// @param path Input path.
543/// @result True if the path is absolute, false if it is not.
544LLVM_ABI bool is_absolute(const Twine &path, Style style = Style::native);
545
546/// Is path absolute using GNU rules?
547///
548/// GNU rules are:
549/// 1) Paths starting with a path separator are absolute.
550/// 2) Windows style paths are also absolute if they start with a character
551/// followed by ':'.
552/// 3) No other paths are absolute.
553///
554/// On Windows style the path "C:\Users\Default" has "C:" as root name and "\"
555/// as root directory.
556///
557/// Hence "C:" on Windows is absolute under GNU rules and not absolute under
558/// C++17 because it has no root directory. Likewise "/" and "\" on Windows are
559/// absolute under GNU and are not absolute under C++17 due to empty root name.
560///
561/// \see has_root_name
562/// \see has_root_directory
563///
564/// @param path Input path.
565/// @param style The style of \p path (e.g. Windows or POSIX). "native" style
566/// means to derive the style from the host.
567/// @result True if the path is absolute following GNU rules, false if it is
568/// not.
570
571/// Is path relative?
572///
573/// @param path Input path.
574/// @result True if the path is relative, false if it is not.
575LLVM_ABI bool is_relative(const Twine &path, Style style = Style::native);
576
577/// Make \a path an absolute path.
578///
579/// Makes \a path absolute using the \a current_directory if it is not already.
580/// An empty \a path will result in the \a current_directory.
581///
582/// /absolute/path => /absolute/path
583/// relative/../path => <current-directory>/relative/../path
584///
585/// @param path A path that is modified to be an absolute path.
586LLVM_ABI void make_absolute(const Twine &current_directory,
588
589} // end namespace path
590} // end namespace sys
591} // end namespace llvm
592
593#endif
#define LLVM_ABI
Definition Compiler.h:213
#define LLVM_LIFETIME_BOUND
Definition Compiler.h:435
Value * RHS
StringRef - Represent a constant reference to a string, i.e.
Definition StringRef.h:55
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition Twine.h:82
CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of ...
Definition iterator.h:80
LLVM_ABI const_iterator & operator++()
Definition Path.cpp:243
LLVM_ABI friend const_iterator begin(StringRef path, Style style)
Get begin iterator over path.
Definition Path.cpp:227
LLVM_ABI friend const_iterator end(StringRef path)
Get end iterator over path.
Definition Path.cpp:236
LLVM_ABI bool operator==(const const_iterator &RHS) const
Definition Path.cpp:290
LLVM_ABI ptrdiff_t operator-(const const_iterator &RHS) const
Difference in bytes between this and RHS.
Definition Path.cpp:294
reference operator*() const
Definition Path.h:87
Reverse path iterator.
Definition Path.h:102
LLVM_ABI friend reverse_iterator rend(StringRef path)
Get reverse end iterator over path.
LLVM_ABI bool operator==(const reverse_iterator &RHS) const
Definition Path.cpp:340
LLVM_ABI ptrdiff_t operator-(const reverse_iterator &RHS) const
Difference in bytes between this and RHS.
Definition Path.cpp:345
LLVM_ABI reverse_iterator & operator++()
Definition Path.cpp:315
LLVM_ABI friend reverse_iterator rbegin(StringRef path, Style style)
Get reverse begin iterator over path.
reference operator*() const
Definition Path.h:112
LLVM_ABI StringRef get_separator(Style style=Style::native)
Return the preferred separator for this platform.
Definition Path.cpp:616
LLVM_ABI StringRef root_path(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get root path.
Definition Path.cpp:349
LLVM_ABI void remove_filename(SmallVectorImpl< char > &path, Style style=Style::native)
Remove the last component from path unless it is the root dir.
Definition Path.cpp:475
LLVM_ABI bool has_relative_path(const Twine &path, Style style=Style::native)
Has relative path?
Definition Path.cpp:643
LLVM_ABI StringRef stem(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get stem.
Definition Path.cpp:586
LLVM_ABI bool has_root_name(const Twine &path, Style style=Style::native)
Has root name?
Definition Path.cpp:622
LLVM_ABI void replace_extension(SmallVectorImpl< char > &path, const Twine &extension, Style style=Style::native)
Replace the file extension of path with extension.
Definition Path.cpp:481
LLVM_ABI bool cache_directory(SmallVectorImpl< char > &result)
Get the directory where installed packages should put their machine-local cache, e....
LLVM_ABI const_iterator begin(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get begin iterator over path.
Definition Path.cpp:227
LLVM_ABI bool user_config_directory(SmallVectorImpl< char > &result)
Get the directory where packages should read user-specific configurations.
LLVM_ABI bool remove_dots(SmallVectorImpl< char > &path, bool remove_dot_dot=false, Style style=Style::native)
Remove '.
Definition Path.cpp:769
LLVM_ABI bool has_root_path(const Twine &path, Style style=Style::native)
Has root path?
Definition Path.cpp:636
constexpr bool is_style_posix(Style S)
Check if S uses POSIX path rules.
Definition Path.h:37
LLVM_ABI StringRef parent_path(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get parent path.
Definition Path.cpp:468
LLVM_ABI bool has_parent_path(const Twine &path, Style style=Style::native)
Has parent path?
Definition Path.cpp:657
void make_preferred(SmallVectorImpl< char > &path, Style style=Style::native)
For Windows path styles, convert path to use the preferred path separators.
Definition Path.h:286
LLVM_ABI bool is_relative(const Twine &path, Style style=Style::native)
Is path relative?
Definition Path.cpp:706
LLVM_ABI void system_temp_directory(bool erasedOnReboot, SmallVectorImpl< char > &result)
Get the typical temporary directory for the system, e.g., "/var/tmp" or "C:/TEMP".
LLVM_ABI bool has_extension(const Twine &path, Style style=Style::native)
Has extension?
Definition Path.cpp:671
LLVM_ABI void make_absolute(const Twine &current_directory, SmallVectorImpl< char > &path)
Make path an absolute path.
Definition Path.cpp:710
LLVM_ABI bool is_absolute_gnu(const Twine &path, Style style=Style::native)
Is path absolute using GNU rules?
Definition Path.cpp:688
LLVM_ABI StringRef filename(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get filename.
Definition Path.cpp:584
LLVM_ABI StringRef remove_leading_dotslash(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Remove redundant leading "./" pieces and consecutive separators.
LLVM_ABI std::string convert_to_slash(StringRef path, Style style=Style::native)
Replaces backslashes with slashes if Windows.
Definition Path.cpp:575
LLVM_ABI void native(const Twine &path, SmallVectorImpl< char > &result, Style style=Style::native)
Convert path to the native form.
Definition Path.cpp:541
LLVM_ABI bool is_absolute(const Twine &path, Style style=Style::native)
Is path absolute?
Definition Path.cpp:678
LLVM_ABI bool has_stem(const Twine &path, Style style=Style::native)
Has stem?
Definition Path.cpp:664
constexpr bool is_style_windows(Style S)
Check if S uses Windows path rules.
Definition Path.h:50
LLVM_ABI StringRef root_name(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get root name.
Definition Path.cpp:374
LLVM_ABI StringRef root_directory(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get root directory.
Definition Path.cpp:391
LLVM_ABI bool replace_path_prefix(SmallVectorImpl< char > &Path, StringRef OldPrefix, StringRef NewPrefix, Style style=Style::native)
Replace matching path prefix with another path.
Definition Path.cpp:519
LLVM_ABI void append(SmallVectorImpl< char > &path, const Twine &a, const Twine &b="", const Twine &c="", const Twine &d="")
Append to path.
Definition Path.cpp:457
LLVM_ABI StringRef extension(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get extension.
Definition Path.cpp:597
LLVM_ABI reverse_iterator rend(StringRef path LLVM_LIFETIME_BOUND)
Get reverse end iterator over path.
LLVM_ABI reverse_iterator rbegin(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get reverse begin iterator over path.
LLVM_ABI bool has_filename(const Twine &path, Style style=Style::native)
Has filename?
Definition Path.cpp:650
LLVM_ABI const_iterator end(StringRef path LLVM_LIFETIME_BOUND)
Get end iterator over path.
Definition Path.cpp:236
LLVM_ABI bool home_directory(SmallVectorImpl< char > &result)
Get the user's home directory.
LLVM_ABI bool is_separator(char value, Style style=Style::native)
Check whether the given char is a path separator on the host OS.
Definition Path.cpp:608
LLVM_ABI StringRef relative_path(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get relative path.
Definition Path.cpp:414
LLVM_ABI bool has_root_directory(const Twine &path, Style style=Style::native)
Has root directory?
Definition Path.cpp:629
This is an optimization pass for GlobalISel generic memory operations.