mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-10 22:46:20 +00:00
Path: Add GetEXESuffix() to complement GetDLLSuffix().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118042 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4638852696
commit
f5a95ce0d4
@ -154,6 +154,12 @@ namespace sys {
|
||||
/// @brief Returns the current working directory.
|
||||
static Path GetCurrentDirectory();
|
||||
|
||||
/// Return the suffix commonly used on file names that contain an
|
||||
/// executable.
|
||||
/// @returns The executable file suffix for the current platform.
|
||||
/// @brief Return the executable file suffix.
|
||||
static StringRef GetEXESuffix();
|
||||
|
||||
/// Return the suffix commonly used on file names that contain a shared
|
||||
/// object, shared archive, or dynamic link library. Such files are
|
||||
/// linked at runtime into a process and their code images are shared
|
||||
|
@ -78,6 +78,10 @@ using namespace sys;
|
||||
|
||||
const char sys::PathSeparator = ':';
|
||||
|
||||
StringRef Path::GetEXESuffix() {
|
||||
return "";
|
||||
}
|
||||
|
||||
Path::Path(StringRef p)
|
||||
: path(p) {}
|
||||
|
||||
|
@ -45,8 +45,13 @@ static void FlipBackSlashes(std::string& s) {
|
||||
|
||||
namespace llvm {
|
||||
namespace sys {
|
||||
|
||||
const char PathSeparator = ';';
|
||||
|
||||
StringRef Path::GetEXESuffix() {
|
||||
return "exe";
|
||||
}
|
||||
|
||||
Path::Path(llvm::StringRef p)
|
||||
: path(p) {
|
||||
FlipBackSlashes(path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user