void DumpSymbolNamesFromFile (std::string &Filename) {
std::string ErrorMessage;
- if (Filename != "-" && !FileOpenable (Filename)) {
+ sys::Path aPath(Filename);
+ if (Filename != "-" && !aPath.readable()) {
std::cerr << ToolName << ": " << Filename << ": " << strerror (errno)
<< "\n";
return;
}
// Note: Currently we do not support reading an archive from stdin.
- if (Filename == "-" || IsBytecode (Filename)) {
+ if (Filename == "-" || aPath.isBytecodeFile()) {
Module *Result = ParseBytecodeFile(Filename, &ErrorMessage);
if (Result) {
DumpSymbolNamesFromModule (Result);
std::cerr << ToolName << ": " << Filename << ": " << ErrorMessage << "\n";
return;
}
- } else if (IsArchive(Filename)) {
+ } else if (aPath.isArchive()) {
Archive* archive = Archive::OpenAndLoad(sys::Path(Filename));
if (!archive)
std::cerr << ToolName << ": " << Filename << ": " << ErrorMessage << "\n";
if (finalPhase == LINKING) {
// Insert the platform-specific system libraries to the path list
- LibraryPaths.push_back(sys::Path::GetSystemLibraryPath1());
- LibraryPaths.push_back(sys::Path::GetSystemLibraryPath2());
+ std::vector<sys::Path> SysLibs;
+ sys::Path::GetSystemLibraryPaths(SysLibs);
+ LibraryPaths.insert(LibraryPaths.end(), SysLibs.begin(), SysLibs.end());
// Set up the linking action with llvm-ld
Action* link = new Action();