mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
Allow "bc" as suffix for bytecode files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16381 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
90b5413883
commit
0cc2d0a1b8
@ -52,6 +52,8 @@ static inline bool IsLibrary(Path& path, const std::string& basename) {
|
||||
return true;
|
||||
else if (path.elide_suffix() && path.append_suffix("o") && path.readable())
|
||||
return true;
|
||||
else if (path.elide_suffix() && path.append_suffix("bc") && path.readable())
|
||||
return true;
|
||||
} else if (path.elide_file() && path.append_file(basename)) {
|
||||
if (path.append_suffix(Path::GetDLLSuffix()) && path.readable())
|
||||
return true;
|
||||
@ -59,6 +61,8 @@ static inline bool IsLibrary(Path& path, const std::string& basename) {
|
||||
return true;
|
||||
else if (path.elide_suffix() && path.append_suffix("o") && path.readable())
|
||||
return true;
|
||||
else if (path.elide_suffix() && path.append_suffix("bc") && path.readable())
|
||||
return true;
|
||||
}
|
||||
path.clear();
|
||||
return false;
|
||||
@ -76,6 +80,10 @@ Path::GetLibraryPath(const std::string& basename,
|
||||
return result;
|
||||
}
|
||||
|
||||
// Try the LLVM lib directory in the LLVM install area
|
||||
if (result.set_directory(LLVM_LIBDIR) && IsLibrary(result,basename))
|
||||
return result;
|
||||
|
||||
// Try /usr/lib
|
||||
if (result.set_directory("/usr/lib/") && IsLibrary(result,basename))
|
||||
return result;
|
||||
|
@ -52,6 +52,8 @@ static inline bool IsLibrary(Path& path, const std::string& basename) {
|
||||
return true;
|
||||
else if (path.elide_suffix() && path.append_suffix("o") && path.readable())
|
||||
return true;
|
||||
else if (path.elide_suffix() && path.append_suffix("bc") && path.readable())
|
||||
return true;
|
||||
} else if (path.elide_file() && path.append_file(basename)) {
|
||||
if (path.append_suffix(Path::GetDLLSuffix()) && path.readable())
|
||||
return true;
|
||||
@ -59,6 +61,8 @@ static inline bool IsLibrary(Path& path, const std::string& basename) {
|
||||
return true;
|
||||
else if (path.elide_suffix() && path.append_suffix("o") && path.readable())
|
||||
return true;
|
||||
else if (path.elide_suffix() && path.append_suffix("bc") && path.readable())
|
||||
return true;
|
||||
}
|
||||
path.clear();
|
||||
return false;
|
||||
@ -76,6 +80,10 @@ Path::GetLibraryPath(const std::string& basename,
|
||||
return result;
|
||||
}
|
||||
|
||||
// Try the LLVM lib directory in the LLVM install area
|
||||
if (result.set_directory(LLVM_LIBDIR) && IsLibrary(result,basename))
|
||||
return result;
|
||||
|
||||
// Try /usr/lib
|
||||
if (result.set_directory("/usr/lib/") && IsLibrary(result,basename))
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user