diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-07-28 22:03:44 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-07-28 22:03:44 +0000 |
| commit | 4857253d98638b9d5aedd1e4b854b8a2f61ff114 (patch) | |
| tree | 0547c61f3117040e6c9642ac2a5e30f9349aafa5 /llvm/lib/Bytecode/Archive/ArchiveWriter.cpp | |
| parent | 6da9d8ecf9fee8e64f922021592e3aeb1a2445bf (diff) | |
| download | bcm5719-llvm-4857253d98638b9d5aedd1e4b854b8a2f61ff114.tar.gz bcm5719-llvm-4857253d98638b9d5aedd1e4b854b8a2f61ff114.zip | |
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
Diffstat (limited to 'llvm/lib/Bytecode/Archive/ArchiveWriter.cpp')
| -rw-r--r-- | llvm/lib/Bytecode/Archive/ArchiveWriter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp b/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp index 390fd128512..52ba99e8054 100644 --- a/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp +++ b/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp @@ -159,7 +159,9 @@ Archive::addFileBefore(const sys::Path& filePath, iterator where) { mbr->data = 0; mbr->path = filePath; - mbr->path.getStatusInfo(mbr->info); + std::string err; + if (mbr->path.getFileStatus(mbr->info, &err)) + throw err; unsigned flags = 0; bool hasSlash = filePath.toString().find('/') != std::string::npos; |

