mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
For PR1050:
Convert asserts into error messages. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32607 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -62,7 +62,12 @@ ArchiveMember::ArchiveMember(Archive* PAR)
|
||||
// different file, presumably as an update to the member. It also makes sure
|
||||
// the flags are reset correctly.
|
||||
bool ArchiveMember::replaceWith(const sys::Path& newFile, std::string* ErrMsg) {
|
||||
assert(newFile.exists() && "Can't replace with a non-existent file");
|
||||
if (!newFile.exists()) {
|
||||
if (ErrMsg)
|
||||
*ErrMsg = "Can not replace an archive member with a non-existent file";
|
||||
return true;
|
||||
}
|
||||
|
||||
data = 0;
|
||||
path = newFile;
|
||||
|
||||
|
Reference in New Issue
Block a user