[clang] Support target names with dots in more utilities (PR #65812)

James Henderson via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 18 00:52:33 PDT 2023


================
@@ -390,6 +390,21 @@ StringRef stem(StringRef path, Style style = Style::native);
 /// @result The extension of \a path.
 StringRef extension(StringRef path, Style style = Style::native);
 
+/// Get the program's name
+///
+/// If the path ends with the string .exe, returns the stem of
+/// \a path. Otherwise returns the filename of \a path.
+///
+/// @code
+///   /foo/prog.exe => prog
+///   /bar/prog     => prog
+///   /foo/prog1.2  => prog1.2
+/// @endcode
+///
+/// @param path Input path.
+/// @result The filename of \a path. Without any .exe component
----------------
jh7370 wrote:

```suggestion
/// @result The filename of \a path without any ".exe" component.
```

https://github.com/llvm/llvm-project/pull/65812


More information about the cfe-commits mailing list