summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2009-09-18 05:10:35 +0000
committerTanya Lattner <tonic@nondot.org>2009-09-18 05:10:35 +0000
commit14db9fed7ce9427cefa9e066f41dd23b4073e464 (patch)
tree3ccbe6cb16b0432f3669dba4c6e339b7ddd18cc8
parent3ad9e4889adcb044907bc3e707d89a7ac1b3ee30 (diff)
Merge 82194 from mainline.upstream/release_26
don't stick an uninitialized 'stat' buf into the stat cache, fill it with zeros. This avoids a GCC warning (PR5000) git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_26@82195 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Basic/FileManager.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Basic/FileManager.cpp b/lib/Basic/FileManager.cpp
index 98979d56cf..448063f46f 100644
--- a/lib/Basic/FileManager.cpp
+++ b/lib/Basic/FileManager.cpp
@@ -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()) {