mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
Return -1 only on failure to execute a program.
Also fix some comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109499 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -30,7 +30,9 @@ namespace {
|
||||
|
||||
std::stringstream* GlobalTimeLog;
|
||||
|
||||
int getTempDir(sys::Path& tempDir) {
|
||||
/// GetTempDir - Get the temporary directory location. Returns non-zero value
|
||||
/// on error.
|
||||
int GetTempDir(sys::Path& tempDir) {
|
||||
// The --temp-dir option.
|
||||
if (!TempDirname.empty()) {
|
||||
tempDir = TempDirname;
|
||||
@ -53,20 +55,20 @@ namespace {
|
||||
std::string ErrMsg;
|
||||
if (tempDir.createDirectoryOnDisk(true, &ErrMsg)) {
|
||||
PrintError(ErrMsg);
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// BuildTargets - A small wrapper for CompilationGraph::Build.
|
||||
/// BuildTargets - A small wrapper for CompilationGraph::Build. Returns non-zero value
|
||||
int BuildTargets(CompilationGraph& graph, const LanguageMap& langMap) {
|
||||
int ret;
|
||||
sys::Path tempDir;
|
||||
bool toDelete = (SaveTemps == SaveTempsEnum::Unset);
|
||||
|
||||
if (int ret = getTempDir(tempDir))
|
||||
if (int ret = GetTempDir(tempDir))
|
||||
return ret;
|
||||
|
||||
ret = graph.Build(tempDir, langMap);
|
||||
|
Reference in New Issue
Block a user