summaryrefslogtreecommitdiff
path: root/lib/Support/SystemUtils.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-12-14 21:35:53 +0000
committerChris Lattner <sabre@nondot.org>2003-12-14 21:35:53 +0000
commit2cdd21c2e4d855500dfb53f77aa74da53ccf9de6 (patch)
tree98803f88a663bba4b7955f121b58306f5ae11d85 /lib/Support/SystemUtils.cpp
parentb6d465f8131f5fb0b8e565685fb3395ed9aecbdb (diff)
downloadllvm-2cdd21c2e4d855500dfb53f77aa74da53ccf9de6.tar.gz
llvm-2cdd21c2e4d855500dfb53f77aa74da53ccf9de6.tar.bz2
llvm-2cdd21c2e4d855500dfb53f77aa74da53ccf9de6.tar.xz
Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10464 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/SystemUtils.cpp')
-rw-r--r--lib/Support/SystemUtils.cpp26
1 files changed, 11 insertions, 15 deletions
diff --git a/lib/Support/SystemUtils.cpp b/lib/Support/SystemUtils.cpp
index ec535ad45a..e1a0bd04d4 100644
--- a/lib/Support/SystemUtils.cpp
+++ b/lib/Support/SystemUtils.cpp
@@ -23,13 +23,12 @@
#include "Config/sys/wait.h"
#include "Config/unistd.h"
#include "Config/errno.h"
-
-namespace llvm {
+using namespace llvm;
/// isExecutableFile - This function returns true if the filename specified
/// exists and is executable.
///
-bool isExecutableFile(const std::string &ExeFileName) {
+bool llvm::isExecutableFile(const std::string &ExeFileName) {
struct stat Buf;
if (stat(ExeFileName.c_str(), &Buf))
return false; // Must not be executable!
@@ -51,8 +50,8 @@ bool isExecutableFile(const std::string &ExeFileName) {
/// directory, nor in the PATH. If the executable cannot be found, return an
/// empty string.
///
-std::string FindExecutable(const std::string &ExeName,
- const std::string &ProgramPath) {
+std::string llvm::FindExecutable(const std::string &ExeName,
+ const std::string &ProgramPath) {
// First check the directory that bugpoint is in. We can do this if
// BugPointPath contains at least one / character, indicating that it is a
// relative path to bugpoint itself.
@@ -116,11 +115,11 @@ static void RedirectFD(const std::string &File, int FD) {
/// the calling program if there is an error executing the specified program.
/// It returns the return value of the program, or -1 if a timeout is detected.
///
-int RunProgramWithTimeout(const std::string &ProgramPath, const char **Args,
- const std::string &StdInFile,
- const std::string &StdOutFile,
- const std::string &StdErrFile) {
-
+int llvm::RunProgramWithTimeout(const std::string &ProgramPath,
+ const char **Args,
+ const std::string &StdInFile,
+ const std::string &StdOutFile,
+ const std::string &StdErrFile) {
// FIXME: install sigalarm handler here for timeout...
int Child = fork();
@@ -204,9 +203,8 @@ int RunProgramWithTimeout(const std::string &ProgramPath, const char **Args,
//
// This function does not use $PATH to find programs.
//
-int
-ExecWait (const char * const old_argv[], const char * const old_envp[])
-{
+int llvm::ExecWait(const char * const old_argv[],
+ const char * const old_envp[]) {
// Child process ID
register int child;
@@ -273,5 +271,3 @@ ExecWait (const char * const old_argv[], const char * const old_envp[])
//
return 1;
}
-
-} // End llvm namespace