don't stick an uninitialized 'stat' buf into the stat cache, fill it
with zeros. This avoids a GCC warning (PR5000) llvm-svn: 82194
This commit is contained in:
@@ -295,6 +295,7 @@ int MemorizeStatCalls::stat(const char *path, struct stat *buf) {
|
||||
if (result != 0) {
|
||||
// Cache failed 'stat' results.
|
||||
struct stat empty;
|
||||
memset(&empty, 0, sizeof(empty));
|
||||
StatCalls[path] = StatResult(result, empty);
|
||||
}
|
||||
else if (!S_ISDIR(buf->st_mode) || llvm::sys::Path(path).isAbsolute()) {
|
||||
|
||||
Reference in New Issue
Block a user