@@ -119,22 +119,24 @@ class reverse_iterator
119
119
// / Get begin iterator over \a path.
120
120
// / @param path Input path.
121
121
// / @returns Iterator initialized with the first component of \a path.
122
- const_iterator begin (StringRef path, Style style = Style::native);
122
+ const_iterator begin (StringRef path LLVM_LIFETIME_BOUND,
123
+ Style style = Style::native);
123
124
124
125
// / Get end iterator over \a path.
125
126
// / @param path Input path.
126
127
// / @returns Iterator initialized to the end of \a path.
127
- const_iterator end (StringRef path);
128
+ const_iterator end (StringRef path LLVM_LIFETIME_BOUND );
128
129
129
130
// / Get reverse begin iterator over \a path.
130
131
// / @param path Input path.
131
132
// / @returns Iterator initialized with the first reverse component of \a path.
132
- reverse_iterator rbegin (StringRef path, Style style = Style::native);
133
+ reverse_iterator rbegin (StringRef path LLVM_LIFETIME_BOUND,
134
+ Style style = Style::native);
133
135
134
136
// / Get reverse end iterator over \a path.
135
137
// / @param path Input path.
136
138
// / @returns Iterator initialized to the reverse end of \a path.
137
- reverse_iterator rend (StringRef path);
139
+ reverse_iterator rend (StringRef path LLVM_LIFETIME_BOUND );
138
140
139
141
// / @}
140
142
// / @name Lexical Modifiers
@@ -199,7 +201,8 @@ bool replace_path_prefix(SmallVectorImpl<char> &Path, StringRef OldPrefix,
199
201
// /
200
202
// / @param path Input path.
201
203
// / @result The cleaned-up \a path.
202
- StringRef remove_leading_dotslash (StringRef path, Style style = Style::native);
204
+ StringRef remove_leading_dotslash (StringRef path LLVM_LIFETIME_BOUND,
205
+ Style style = Style::native);
203
206
204
207
// / In-place remove any './' and optionally '../' components from a path.
205
208
// /
@@ -295,7 +298,8 @@ std::string convert_to_slash(StringRef path, Style style = Style::native);
295
298
// /
296
299
// / @param path Input path.
297
300
// / @result The root name of \a path if it has one, otherwise "".
298
- StringRef root_name (StringRef path, Style style = Style::native);
301
+ StringRef root_name (StringRef path LLVM_LIFETIME_BOUND,
302
+ Style style = Style::native);
299
303
300
304
// / Get root directory.
301
305
// /
@@ -308,15 +312,17 @@ StringRef root_name(StringRef path, Style style = Style::native);
308
312
// / @param path Input path.
309
313
// / @result The root directory of \a path if it has one, otherwise
310
314
// / "".
311
- StringRef root_directory (StringRef path, Style style = Style::native);
315
+ StringRef root_directory (StringRef path LLVM_LIFETIME_BOUND,
316
+ Style style = Style::native);
312
317
313
318
// / Get root path.
314
319
// /
315
320
// / Equivalent to root_name + root_directory.
316
321
// /
317
322
// / @param path Input path.
318
323
// / @result The root path of \a path if it has one, otherwise "".
319
- StringRef root_path (StringRef path, Style style = Style::native);
324
+ StringRef root_path (StringRef path LLVM_LIFETIME_BOUND,
325
+ Style style = Style::native);
320
326
321
327
// / Get relative path.
322
328
// /
@@ -328,7 +334,8 @@ StringRef root_path(StringRef path, Style style = Style::native);
328
334
// /
329
335
// / @param path Input path.
330
336
// / @result The path starting after root_path if one exists, otherwise "".
331
- StringRef relative_path (StringRef path, Style style = Style::native);
337
+ StringRef relative_path (StringRef path LLVM_LIFETIME_BOUND,
338
+ Style style = Style::native);
332
339
333
340
// / Get parent path.
334
341
// /
@@ -340,7 +347,8 @@ StringRef relative_path(StringRef path, Style style = Style::native);
340
347
// /
341
348
// / @param path Input path.
342
349
// / @result The parent path of \a path if one exists, otherwise "".
343
- StringRef parent_path (StringRef path, Style style = Style::native);
350
+ StringRef parent_path (StringRef path LLVM_LIFETIME_BOUND,
351
+ Style style = Style::native);
344
352
345
353
// / Get filename.
346
354
// /
@@ -354,7 +362,8 @@ StringRef parent_path(StringRef path, Style style = Style::native);
354
362
// / @param path Input path.
355
363
// / @result The filename part of \a path. This is defined as the last component
356
364
// / of \a path. Similar to the POSIX "basename" utility.
357
- StringRef filename (StringRef path, Style style = Style::native);
365
+ StringRef filename (StringRef path LLVM_LIFETIME_BOUND,
366
+ Style style = Style::native);
358
367
359
368
// / Get stem.
360
369
// /
@@ -372,7 +381,7 @@ StringRef filename(StringRef path, Style style = Style::native);
372
381
// /
373
382
// / @param path Input path.
374
383
// / @result The stem of \a path.
375
- StringRef stem (StringRef path, Style style = Style::native);
384
+ StringRef stem (StringRef path LLVM_LIFETIME_BOUND , Style style = Style::native);
376
385
377
386
// / Get extension.
378
387
// /
@@ -388,7 +397,8 @@ StringRef stem(StringRef path, Style style = Style::native);
388
397
// /
389
398
// / @param path Input path.
390
399
// / @result The extension of \a path.
391
- StringRef extension (StringRef path, Style style = Style::native);
400
+ StringRef extension (StringRef path LLVM_LIFETIME_BOUND,
401
+ Style style = Style::native);
392
402
393
403
// / Check whether the given char is a path separator on the host OS.
394
404
// /
0 commit comments