Commit b2d5a6d2 authored by Tanya Lattner's avatar Tanya Lattner
Browse files

Merge 82194 from mainline.

don't stick an uninitialized 'stat' buf into the stat cache, fill it
with zeros.  This avoids a GCC warning (PR5000)

llvm-svn: 82195
parent 18949d7b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -293,6 +293,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()) {