aboutsummaryrefslogtreecommitdiff
path: root/tools/llee/SysUtils.h
blob: 89b647970e3b71a94db450abda234f11a2889d20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*===- sysutils.h - Utilities to do low-level system stuff -------*- C -*--===*\
 *                                                                            *
 * This file contains functions used to do a variety of low-level, often      *
 * system-specific, tasks.                                                    *
 *                                                                            *
\*===----------------------------------------------------------------------===*/

#ifndef SYSUTILS_H
#define SYSUTILS_H

typedef unsigned bool;
enum { false = 0, true = 1 };

/*
 * isExecutableFile - This function returns true if the filename specified
 * exists and is executable.
 */
bool isExecutableFile(const char *ExeFileName);

/*
 * FindExecutable - Find a named executable, giving the argv[0] of program
 * being executed. This allows us to find another LLVM tool if it is built into
 * the same directory, but that directory is neither the current directory, nor
 * in the PATH.  If the executable cannot be found, return an empty string.
 */ 
char *FindExecutable(const char *ExeName);

#endif