From 6c336fa5a7a2c22c37d57f7ba8dd052b75d9aeec Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 11 Mar 2014 09:37:27 +0000 Subject: [PATCH] clang::HeaderSearch: Use default constructor even for POD. Unfortunately, msvc 2012 didn't accept non-static member initializer. llvm-svn: 203554 --- clang/include/clang/Lex/HeaderSearch.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/clang/include/clang/Lex/HeaderSearch.h b/clang/include/clang/Lex/HeaderSearch.h index d1cb8118c0c3..d3b3193572af 100644 --- a/clang/include/clang/Lex/HeaderSearch.h +++ b/clang/include/clang/Lex/HeaderSearch.h @@ -191,12 +191,15 @@ class HeaderSearch { /// Starting index in SearchDirs that the cached search was performed from. /// If there is a hit and this value doesn't match the current query, the /// cache has to be ignored. - unsigned StartIdx = 0; + unsigned StartIdx; /// The entry in SearchDirs that satisfied the query. - unsigned HitIdx = 0; + unsigned HitIdx; /// This is non-null if the original filename was mapped to a framework /// include via a headermap. - const char *MappedName = nullptr; + const char *MappedName; + + /// Default constructor -- Initialize all members with zero. + LookupFileCacheInfo(): StartIdx(0), HitIdx(0), MappedName(nullptr) {} }; llvm::StringMap LookupFileCache;