/// @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();
-
/// GetMainExecutable - Return the path to the main executable, given the
/// value of argv[0] from program startup and the address of main itself.
/// In extremis, this function may fail and return an empty path.
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
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();
}