aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Support/Unix/Program.inc
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/Unix/Program.inc')
-rw-r--r--contrib/llvm-project/llvm/lib/Support/Unix/Program.inc17
1 files changed, 0 insertions, 17 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/Unix/Program.inc b/contrib/llvm-project/llvm/lib/Support/Unix/Program.inc
index 2742734bb11e..4f17b2257a75 100644
--- a/contrib/llvm-project/llvm/lib/Support/Unix/Program.inc
+++ b/contrib/llvm-project/llvm/lib/Support/Unix/Program.inc
@@ -28,18 +28,10 @@
#include "llvm/Support/StringSaver.h"
#include "llvm/Support/SystemZ/zOSSupport.h"
#include "llvm/Support/raw_ostream.h"
-#if HAVE_SYS_STAT_H
#include <sys/stat.h>
-#endif
-#if HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
-#endif
-#if HAVE_SIGNAL_H
#include <signal.h>
-#endif
-#if HAVE_FCNTL_H
#include <fcntl.h>
-#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -146,7 +138,6 @@ static bool RedirectIO_PS(const std::string *Path, int FD, std::string *ErrMsg,
static void TimeOutHandler(int Sig) {}
static void SetMemoryLimits(unsigned size) {
-#if HAVE_SYS_RESOURCE_H && HAVE_GETRLIMIT && HAVE_SETRLIMIT
struct rlimit r;
__typeof__(r.rlim_cur) limit = (__typeof__(r.rlim_cur))(size)*1048576;
@@ -160,7 +151,6 @@ static void SetMemoryLimits(unsigned size) {
r.rlim_cur = limit;
setrlimit(RLIMIT_RSS, &r);
#endif
-#endif
}
static std::vector<const char *>
@@ -178,13 +168,6 @@ static bool Execute(ProcessInfo &PI, StringRef Program,
ArrayRef<std::optional<StringRef>> Redirects,
unsigned MemoryLimit, std::string *ErrMsg,
BitVector *AffinityMask, bool DetachProcess) {
- if (!llvm::sys::fs::exists(Program)) {
- if (ErrMsg)
- *ErrMsg = std::string("Executable \"") + Program.str() +
- std::string("\" doesn't exist!");
- return false;
- }
-
assert(!AffinityMask && "Starting a process with an affinity mask is "
"currently not supported on Unix!");