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:
Chris Lattner
2009-09-18 04:51:01 +00:00
parent 2b5e1dda69
commit 01ce06fbbc

View File

@@ -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()) {