llvm.org GIT mirror llvm / 36f396e
Fix a doxygen issue: these examples are supposed to be displayed preformatted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163787 91177308-0d34-0410-b5e6-96231b3b80d8 Dmitri Gribenko 7 years ago
1 changed file(s) with 66 addition(s) and 43 deletion(s). Raw diff Collapse all Expand all
3838 /// The backwards traversal order is the reverse of forward traversal.
3939 ///
4040 /// Iteration examples. Each component is separated by ',':
41 /// / => /
42 /// /foo => /,foo
43 /// foo/ => foo,.
44 /// /foo/bar => /,foo,bar
45 /// ../ => ..,.
46 /// C:\foo\bar => C:,/,foo,bar
47 ///
41 /// @code
42 /// / => /
43 /// /foo => /,foo
44 /// foo/ => foo,.
45 /// /foo/bar => /,foo,bar
46 /// ../ => ..,.
47 /// C:\foo\bar => C:,/,foo,bar
48 /// @endcode
4849 class const_iterator {
4950 StringRef Path; ///< The entire path.
5051 StringRef Component; ///< The current component. Not necessarily in Path.
106107
107108 /// @brief Remove the last component from \a path unless it is the root dir.
108109 ///
109 /// directory/filename.cpp => directory/
110 /// directory/ => directory
111 /// / => /
110 /// @code
111 /// directory/filename.cpp => directory/
112 /// directory/ => directory
113 /// / => /
114 /// @endcode
112115 ///
113116 /// @param path A path that is modified to not have a file component.
114117 void remove_filename(SmallVectorImpl &path);
115118
116119 /// @brief Replace the file extension of \a path with \a extension.
117120 ///
118 /// ./filename.cpp => ./filename.extension
119 /// ./filename => ./filename.extension
120 /// ./ => ./.extension
121 /// @code
122 /// ./filename.cpp => ./filename.extension
123 /// ./filename => ./filename.extension
124 /// ./ => ./.extension
125 /// @endcode
121126 ///
122127 /// @param path A path that has its extension replaced with \a extension.
123128 /// @param extension The extension to be added. It may be empty. It may also
127132
128133 /// @brief Append to path.
129134 ///
130 /// /foo + bar/f => /foo/bar/f
131 /// /foo/ + bar/f => /foo/bar/f
132 /// foo + bar/f => foo/bar/f
135 /// @code
136 /// /foo + bar/f => /foo/bar/f
137 /// /foo/ + bar/f => /foo/bar/f
138 /// foo + bar/f => foo/bar/f
139 /// @endcode
133140 ///
134141 /// @param path Set to \a path + \a component.
135142 /// @param a The component to be appended to \a path.
140147
141148 /// @brief Append to path.
142149 ///
143 /// /foo + [bar,f] => /foo/bar/f
144 /// /foo/ + [bar,f] => /foo/bar/f
145 /// foo + [bar,f] => foo/bar/f
150 /// @code
151 /// /foo + [bar,f] => /foo/bar/f
152 /// /foo/ + [bar,f] => /foo/bar/f
153 /// foo + [bar,f] => foo/bar/f
154 /// @endcode
146155 ///
147156 /// @param path Set to \a path + [\a begin, \a end).
148157 /// @param begin Start of components to append.
168177
169178 /// @brief Get root name.
170179 ///
171 /// //net/hello => //net
172 /// c:/hello => c: (on Windows, on other platforms nothing)
173 /// /hello =>
180 /// @code
181 /// //net/hello => //net
182 /// c:/hello => c: (on Windows, on other platforms nothing)
183 /// /hello =>
184 /// @endcode
174185 ///
175186 /// @param path Input path.
176187 /// @result The root name of \a path if it has one, otherwise "".
178189
179190 /// @brief Get root directory.
180191 ///
181 /// /goo/hello => /
182 /// c:/hello => /
183 /// d/file.txt =>
192 /// @code
193 /// /goo/hello => /
194 /// c:/hello => /
195 /// d/file.txt =>
196 /// @endcode
184197 ///
185198 /// @param path Input path.
186199 /// @result The root directory of \a path if it has one, otherwise
197210
198211 /// @brief Get relative path.
199212 ///
200 /// C:\hello\world => hello\world
201 /// foo/bar => foo/bar
202 /// /foo/bar => foo/bar
213 /// @code
214 /// C:\hello\world => hello\world
215 /// foo/bar => foo/bar
216 /// /foo/bar => foo/bar
217 /// @endcode
203218 ///
204219 /// @param path Input path.
205220 /// @result The path starting after root_path if one exists, otherwise "".
207222
208223 /// @brief Get parent path.
209224 ///
210 /// / =>
211 /// /foo => /
212 /// foo/../bar => foo/..
225 /// @code
226 /// / =>
227 /// /foo => /
228 /// foo/../bar => foo/..
229 /// @endcode
213230 ///
214231 /// @param path Input path.
215232 /// @result The parent path of \a path if one exists, otherwise "".
217234
218235 /// @brief Get filename.
219236 ///
220 /// /foo.txt => foo.txt
221 /// . => .
222 /// .. => ..
223 /// / => /
237 /// @code
238 /// /foo.txt => foo.txt
239 /// . => .
240 /// .. => ..
241 /// / => /
242 /// @endcode
224243 ///
225244 /// @param path Input path.
226245 /// @result The filename part of \a path. This is defined as the last component
233252 /// substring of filename ending at (but not including) the last dot. Otherwise
234253 /// it is filename.
235254 ///
236 /// /foo/bar.txt => bar
237 /// /foo/bar => bar
238 /// /foo/.txt =>
239 /// /foo/. => .
240 /// /foo/.. => ..
255 /// @code
256 /// /foo/bar.txt => bar
257 /// /foo/bar => bar
258 /// /foo/.txt =>
259 /// /foo/. => .
260 /// /foo/.. => ..
261 /// @endcode
241262 ///
242263 /// @param path Input path.
243264 /// @result The stem of \a path.
249270 /// substring of filename starting at (and including) the last dot, and ending
250271 /// at the end of \a path. Otherwise "".
251272 ///
252 /// /foo/bar.txt => .txt
253 /// /foo/bar =>
254 /// /foo/.txt => .txt
273 /// @code
274 /// /foo/bar.txt => .txt
275 /// /foo/bar =>
276 /// /foo/.txt => .txt
277 /// @endcode
255278 ///
256279 /// @param path Input path.
257280 /// @result The extension of \a path.