mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-11 10:31:27 +00:00
Remove a trivial use of sys::Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184455 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
51d1bda39b
commit
201c66c9b0
@ -653,26 +653,19 @@ int main(int argc, char **argv) {
|
|||||||
// can't handle the grouped positional parameters without a dash.
|
// can't handle the grouped positional parameters without a dash.
|
||||||
ArchiveOperation Operation = parseCommandLine();
|
ArchiveOperation Operation = parseCommandLine();
|
||||||
|
|
||||||
// Check the path name of the archive
|
|
||||||
sys::Path ArchivePath;
|
|
||||||
if (!ArchivePath.set(ArchiveName)) {
|
|
||||||
errs() << argv[0] << ": Archive name invalid: " << ArchiveName << "\n";
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create or open the archive object.
|
// Create or open the archive object.
|
||||||
bool Exists;
|
bool Exists;
|
||||||
if (llvm::sys::fs::exists(ArchivePath.str(), Exists) || !Exists) {
|
if (llvm::sys::fs::exists(ArchiveName, Exists) || !Exists) {
|
||||||
// Produce a warning if we should and we're creating the archive
|
// Produce a warning if we should and we're creating the archive
|
||||||
if (!Create)
|
if (!Create)
|
||||||
errs() << argv[0] << ": creating " << ArchivePath.str() << "\n";
|
errs() << argv[0] << ": creating " << ArchiveName << "\n";
|
||||||
TheArchive = Archive::CreateEmpty(ArchivePath.str(), Context);
|
TheArchive = Archive::CreateEmpty(ArchiveName, Context);
|
||||||
TheArchive->writeToDisk();
|
TheArchive->writeToDisk();
|
||||||
} else {
|
} else {
|
||||||
std::string Error;
|
std::string Error;
|
||||||
TheArchive = Archive::OpenAndLoad(ArchivePath.str(), Context, &Error);
|
TheArchive = Archive::OpenAndLoad(ArchiveName, Context, &Error);
|
||||||
if (TheArchive == 0) {
|
if (TheArchive == 0) {
|
||||||
errs() << argv[0] << ": error loading '" << ArchivePath.str() << "': "
|
errs() << argv[0] << ": error loading '" << ArchiveName << "': "
|
||||||
<< Error << "!\n";
|
<< Error << "!\n";
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user