projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change Path::getStatusInfo to return a boolean and error string on an error
[oota-llvm.git]
/
lib
/
Bytecode
/
Archive
/
Archive.cpp
diff --git
a/lib/Bytecode/Archive/Archive.cpp
b/lib/Bytecode/Archive/Archive.cpp
index 66b9d703a0da117537d3ceae4cadc68000e55180..3bb9a05508384e9478e9a163f9eb67aadcabf791 100644
(file)
--- a/
lib/Bytecode/Archive/Archive.cpp
+++ b/
lib/Bytecode/Archive/Archive.cpp
@@
-104,12
+104,14
@@
void ArchiveMember::replaceWith(const sys::Path& newFile) {
flags &= ~HasLongFilenameFlag;
// Get the signature and status info
flags &= ~HasLongFilenameFlag;
// Get the signature and status info
- std::string magic;
const char* signature = (const char*) data;
const char* signature = (const char*) data;
+ std::string magic;
if (!signature) {
path.getMagicNumber(magic,4);
signature = magic.c_str();
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
}
// Determine what kind of file it is