From: Hans Wennborg Date: Tue, 2 Dec 2014 02:13:09 +0000 (+0000) Subject: Try to fix the MSVC build. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=da7accb90f57f4657967c22d89f3e76a3a6118a3;p=clang Try to fix the MSVC build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223105 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Lex/ModuleMap.cpp b/lib/Lex/ModuleMap.cpp index a270b56e6a..9ac554ae96 100644 --- a/lib/Lex/ModuleMap.cpp +++ b/lib/Lex/ModuleMap.cpp @@ -1786,23 +1786,23 @@ void ModuleMapParser::parseHeaderDecl(MMToken::TokenKind LeadingToken, Map.setUmbrellaHeader(ActiveModule, File); } } else if (LeadingToken == MMToken::ExcludeKeyword) { - Map.excludeHeader(ActiveModule, - Module::Header{RelativePathName.str(), File}); + Module::Header H = {RelativePathName.str(), File}; + Map.excludeHeader(ActiveModule, H); } else { // If there is a builtin counterpart to this file, add it now, before // the "real" header, so we build the built-in one first when building // the module. - if (BuiltinFile) + if (BuiltinFile) { // FIXME: Taking the name from the FileEntry is unstable and can give // different results depending on how we've previously named that file // in this build. - Map.addHeader(ActiveModule, - Module::Header{BuiltinFile->getName(), BuiltinFile}, - Role); + Module::Header H = { BuiltinFile->getName(), BuiltinFile }; + Map.addHeader(ActiveModule, H, Role); + } // Record this header. - Map.addHeader(ActiveModule, Module::Header{RelativePathName.str(), File}, - Role); + Module::Header H = { RelativePathName.str(), File }; + Map.addHeader(ActiveModule, H, Role); } } else if (LeadingToken != MMToken::ExcludeKeyword) { // Ignore excluded header files. They're optional anyway. diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index e1daa04647..b253704a36 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -1563,9 +1563,8 @@ HeaderFileInfoTrait::ReadData(internal_key_ref key, const unsigned char *d, // information should be propagated through the SUBMODULE_HEADER etc // records rather than from here. // FIXME: We don't ever mark excluded headers. - ModMap.addHeader( - Mod, Module::Header{key.Filename, FileMgr.getFile(key.Filename)}, - HFI.getHeaderRole()); + Module::Header H = { key.Filename, FileMgr.getFile(key.Filename) }; + ModMap.addHeader(Mod, H, HFI.getHeaderRole()); } }