mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Move GetEXESuffix to the one place it is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184853 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -234,6 +234,12 @@ int LLI::ExecuteProgram(const std::string &Bitcode,
|
||||
|
||||
void AbstractInterpreter::anchor() { }
|
||||
|
||||
#if defined(LLVM_ON_UNIX)
|
||||
const char EXESuffix[] = "";
|
||||
#elif defined (LLVM_ON_WIN32)
|
||||
const char EXESuffix[] = "exe";
|
||||
#endif
|
||||
|
||||
/// Prepend the path to the program being executed
|
||||
/// to \p ExeName, given the value of argv[0] and the address of main()
|
||||
/// itself. This allows us to find another LLVM tool if it is built in the same
|
||||
@@ -252,7 +258,7 @@ static std::string PrependMainExecutablePath(const std::string &ExeName,
|
||||
if (!Result.empty()) {
|
||||
SmallString<128> Storage = Result;
|
||||
sys::path::append(Storage, ExeName);
|
||||
sys::path::replace_extension(Storage, sys::Path::GetEXESuffix());
|
||||
sys::path::replace_extension(Storage, EXESuffix);
|
||||
return Storage.str();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user