From 4857253d98638b9d5aedd1e4b854b8a2f61ff114 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 28 Jul 2006 22:03:44 +0000 Subject: Change Path::getStatusInfo to return a boolean and error string on an error instead of throwing an exception. This reduces the amount of code that is exposed to exceptions (e.g. FileUtilities), though it is clearly only one step along the way. llvm-svn: 29395 --- llvm/lib/Bytecode/Archive/Archive.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Bytecode/Archive/Archive.cpp') diff --git a/llvm/lib/Bytecode/Archive/Archive.cpp b/llvm/lib/Bytecode/Archive/Archive.cpp index 66b9d703a0d..3bb9a055083 100644 --- a/llvm/lib/Bytecode/Archive/Archive.cpp +++ b/llvm/lib/Bytecode/Archive/Archive.cpp @@ -104,12 +104,14 @@ void ArchiveMember::replaceWith(const sys::Path& newFile) { flags &= ~HasLongFilenameFlag; // Get the signature and status info - std::string magic; const char* signature = (const char*) data; + std::string magic; if (!signature) { path.getMagicNumber(magic,4); signature = magic.c_str(); - path.getStatusInfo(info); + std::string err; + if (path.getFileStatus(info, &err)) + throw err; } // Determine what kind of file it is -- cgit v1.2.3