forked from OSchip/llvm-project
For PR797:
Final remove of exception handling from this file. lib/System can no longer throw exceptions so there's no need for try/catch blocks here. llvm-svn: 29848
This commit is contained in:
parent
dd27929918
commit
d62a96323d
|
@ -164,7 +164,6 @@ int llvm::DiffFilesWithTolerance(const sys::Path &FileA,
|
|||
if ((A_size == 0 || B_size == 0))
|
||||
return 1;
|
||||
|
||||
try {
|
||||
// Now its safe to mmap the files into memory becasue both files
|
||||
// have a non-zero size.
|
||||
sys::MappedFile F1;
|
||||
|
@ -250,11 +249,4 @@ int llvm::DiffFilesWithTolerance(const sys::Path &FileA,
|
|||
if (OrigFile2Start != File2Start)
|
||||
delete[] (File2Start-1); // Back up past null byte
|
||||
return CompareFailed;
|
||||
} catch (const std::string &Msg) {
|
||||
if (Error) *Error = Msg;
|
||||
return 2;
|
||||
} catch (...) {
|
||||
*Error = "Unknown Exception Occurred";
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue