mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-25 00:29: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…
Reference in New Issue
Block a user