Re: r304346 - [modules] When compiling a preprocessed module map, look for headers relative

2017-06-01 Thread Richard Smith via cfe-commits
On 1 June 2017 at 12:53, Richard Smith  wrote:

> On 1 June 2017 at 11:10, Galina Kistanova  wrote:
>
>> Hello Richard,
>>
>> This commit broke tests on few of our builders:
>>
>> Failing Tests (2):
>> Clang :: Modules/preprocess-module.cpp
>> Clang :: Modules/preprocess-nested.cpp
>>
>> http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei
>> -ps4-windows10pro-fast/builds/10199
>> and
>> http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensiv
>> e-checks-win/builds/2819
>>
>> Please have a look at this?
>>
>
> Sure, looking.
>

Should be fixed in r304464.


> Also I see that email notifications on these failures were sent.
>>
>
> They certainly did not arrive here. As I've mentioned before, I have not
> received any mail from any lab.llvm.org bots since early March.
>
>
>> Thanks
>>
>> Galina
>>
>>
>> On Wed, May 31, 2017 at 1:56 PM, Richard Smith via cfe-commits <
>> cfe-commits@lists.llvm.org> wrote:
>>
>>> Author: rsmith
>>> Date: Wed May 31 15:56:55 2017
>>> New Revision: 304346
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=304346=rev
>>> Log:
>>> [modules] When compiling a preprocessed module map, look for headers
>>> relative
>>> to the original module map.
>>>
>>> Also use the path and name of the original module map when emitting that
>>> information into the .pcm file. The upshot of this is that the produced
>>> .pcm
>>> file will track information for headers in their original locations
>>> (where the
>>> module was preprocessed), not relative to whatever directory the
>>> preprocessed
>>> module map was in when it was built.
>>>
>>> Modified:
>>> cfe/trunk/include/clang/Basic/Module.h
>>> cfe/trunk/include/clang/Lex/HeaderSearch.h
>>> cfe/trunk/lib/Frontend/FrontendAction.cpp
>>> cfe/trunk/lib/Lex/HeaderSearch.cpp
>>> cfe/trunk/lib/Serialization/ASTWriter.cpp
>>> cfe/trunk/test/Modules/preprocess-module.cpp
>>> cfe/trunk/test/Modules/preprocess-nested.cpp
>>>
>>> Modified: cfe/trunk/include/clang/Basic/Module.h
>>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/
>>> Basic/Module.h?rev=304346=304345=304346=diff
>>> 
>>> ==
>>> --- cfe/trunk/include/clang/Basic/Module.h (original)
>>> +++ cfe/trunk/include/clang/Basic/Module.h Wed May 31 15:56:55 2017
>>> @@ -83,6 +83,10 @@ public:
>>>/// are found.
>>>const DirectoryEntry *Directory;
>>>
>>> +  /// \brief The presumed file name for the module map defining this
>>> module.
>>> +  /// Only non-empty when building from preprocessed source.
>>> +  std::string PresumedModuleMapFile;
>>> +
>>>/// \brief The umbrella header or directory.
>>>llvm::PointerUnion
>>> Umbrella;
>>>
>>>
>>> Modified: cfe/trunk/include/clang/Lex/HeaderSearch.h
>>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/
>>> Lex/HeaderSearch.h?rev=304346=304345=304346=diff
>>> 
>>> ==
>>> --- cfe/trunk/include/clang/Lex/HeaderSearch.h (original)
>>> +++ cfe/trunk/include/clang/Lex/HeaderSearch.h Wed May 31 15:56:55 2017
>>> @@ -543,10 +543,13 @@ public:
>>>/// \param Offset [inout] An offset within ID to start parsing. On
>>> exit,
>>>///filled by the end of the parsed contents (either EOF or the
>>>///location of an end-of-module-map pragma).
>>> -  ///
>>> +  /// \param OriginalModuleMapFile The original path to the module map
>>> file,
>>> +  ///used to resolve paths within the module (this is required
>>> when
>>> +  ///building the module from preprocessed source).
>>>/// \returns true if an error occurred, false otherwise.
>>>bool loadModuleMapFile(const FileEntry *File, bool IsSystem,
>>> - FileID ID = FileID(), unsigned *Offset =
>>> nullptr);
>>> + FileID ID = FileID(), unsigned *Offset =
>>> nullptr,
>>> + StringRef OriginalModuleMapFile = StringRef());
>>>
>>>/// \brief Collect the set of all known, top-level modules.
>>>///
>>>
>>> Modified: cfe/trunk/lib/Frontend/FrontendAction.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/F
>>> rontendAction.cpp?rev=304346=304345=304346=diff
>>> 
>>> ==
>>> --- cfe/trunk/lib/Frontend/FrontendAction.cpp (original)
>>> +++ cfe/trunk/lib/Frontend/FrontendAction.cpp Wed May 31 15:56:55 2017
>>> @@ -373,10 +373,11 @@ collectModuleHeaderIncludes(const LangOp
>>>return std::error_code();
>>>  }
>>>
>>> -static bool
>>> -loadModuleMapForModuleBuild(CompilerInstance , StringRef Filename,
>>> -bool IsSystem, bool IsPreprocessed,
>>> -unsigned ) {
>>> +static bool loadModuleMapForModuleBuild(CompilerInstance ,
>>> +

Re: r304346 - [modules] When compiling a preprocessed module map, look for headers relative

2017-06-01 Thread Richard Smith via cfe-commits
On 1 June 2017 at 11:10, Galina Kistanova  wrote:

> Hello Richard,
>
> This commit broke tests on few of our builders:
>
> Failing Tests (2):
> Clang :: Modules/preprocess-module.cpp
> Clang :: Modules/preprocess-nested.cpp
>
> http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-
> scei-ps4-windows10pro-fast/builds/10199
> and
> http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensiv
> e-checks-win/builds/2819
>
> Please have a look at this?
>

Sure, looking.


> Also I see that email notifications on these failures were sent.
>

They certainly did not arrive here. As I've mentioned before, I have not
received any mail from any lab.llvm.org bots since early March.


> Thanks
>
> Galina
>
>
> On Wed, May 31, 2017 at 1:56 PM, Richard Smith via cfe-commits <
> cfe-commits@lists.llvm.org> wrote:
>
>> Author: rsmith
>> Date: Wed May 31 15:56:55 2017
>> New Revision: 304346
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=304346=rev
>> Log:
>> [modules] When compiling a preprocessed module map, look for headers
>> relative
>> to the original module map.
>>
>> Also use the path and name of the original module map when emitting that
>> information into the .pcm file. The upshot of this is that the produced
>> .pcm
>> file will track information for headers in their original locations
>> (where the
>> module was preprocessed), not relative to whatever directory the
>> preprocessed
>> module map was in when it was built.
>>
>> Modified:
>> cfe/trunk/include/clang/Basic/Module.h
>> cfe/trunk/include/clang/Lex/HeaderSearch.h
>> cfe/trunk/lib/Frontend/FrontendAction.cpp
>> cfe/trunk/lib/Lex/HeaderSearch.cpp
>> cfe/trunk/lib/Serialization/ASTWriter.cpp
>> cfe/trunk/test/Modules/preprocess-module.cpp
>> cfe/trunk/test/Modules/preprocess-nested.cpp
>>
>> Modified: cfe/trunk/include/clang/Basic/Module.h
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/
>> Basic/Module.h?rev=304346=304345=304346=diff
>> 
>> ==
>> --- cfe/trunk/include/clang/Basic/Module.h (original)
>> +++ cfe/trunk/include/clang/Basic/Module.h Wed May 31 15:56:55 2017
>> @@ -83,6 +83,10 @@ public:
>>/// are found.
>>const DirectoryEntry *Directory;
>>
>> +  /// \brief The presumed file name for the module map defining this
>> module.
>> +  /// Only non-empty when building from preprocessed source.
>> +  std::string PresumedModuleMapFile;
>> +
>>/// \brief The umbrella header or directory.
>>llvm::PointerUnion Umbrella;
>>
>>
>> Modified: cfe/trunk/include/clang/Lex/HeaderSearch.h
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/
>> Lex/HeaderSearch.h?rev=304346=304345=304346=diff
>> 
>> ==
>> --- cfe/trunk/include/clang/Lex/HeaderSearch.h (original)
>> +++ cfe/trunk/include/clang/Lex/HeaderSearch.h Wed May 31 15:56:55 2017
>> @@ -543,10 +543,13 @@ public:
>>/// \param Offset [inout] An offset within ID to start parsing. On
>> exit,
>>///filled by the end of the parsed contents (either EOF or the
>>///location of an end-of-module-map pragma).
>> -  ///
>> +  /// \param OriginalModuleMapFile The original path to the module map
>> file,
>> +  ///used to resolve paths within the module (this is required
>> when
>> +  ///building the module from preprocessed source).
>>/// \returns true if an error occurred, false otherwise.
>>bool loadModuleMapFile(const FileEntry *File, bool IsSystem,
>> - FileID ID = FileID(), unsigned *Offset =
>> nullptr);
>> + FileID ID = FileID(), unsigned *Offset =
>> nullptr,
>> + StringRef OriginalModuleMapFile = StringRef());
>>
>>/// \brief Collect the set of all known, top-level modules.
>>///
>>
>> Modified: cfe/trunk/lib/Frontend/FrontendAction.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/F
>> rontendAction.cpp?rev=304346=304345=304346=diff
>> 
>> ==
>> --- cfe/trunk/lib/Frontend/FrontendAction.cpp (original)
>> +++ cfe/trunk/lib/Frontend/FrontendAction.cpp Wed May 31 15:56:55 2017
>> @@ -373,10 +373,11 @@ collectModuleHeaderIncludes(const LangOp
>>return std::error_code();
>>  }
>>
>> -static bool
>> -loadModuleMapForModuleBuild(CompilerInstance , StringRef Filename,
>> -bool IsSystem, bool IsPreprocessed,
>> -unsigned ) {
>> +static bool loadModuleMapForModuleBuild(CompilerInstance ,
>> +StringRef Filename, bool
>> IsSystem,
>> +bool IsPreprocessed,
>> +std::string
>> ,
>> +unsigned ) {
>>auto  = 

Re: r304346 - [modules] When compiling a preprocessed module map, look for headers relative

2017-06-01 Thread Galina Kistanova via cfe-commits
Hello Richard,

This commit broke tests on few of our builders:

Failing Tests (2):
Clang :: Modules/preprocess-module.cpp
Clang :: Modules/preprocess-nested.cpp

http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/10199
and
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/2819

Please have a look at this?

Also I see that email notifications on these failures were sent.

Thanks

Galina


On Wed, May 31, 2017 at 1:56 PM, Richard Smith via cfe-commits <
cfe-commits@lists.llvm.org> wrote:

> Author: rsmith
> Date: Wed May 31 15:56:55 2017
> New Revision: 304346
>
> URL: http://llvm.org/viewvc/llvm-project?rev=304346=rev
> Log:
> [modules] When compiling a preprocessed module map, look for headers
> relative
> to the original module map.
>
> Also use the path and name of the original module map when emitting that
> information into the .pcm file. The upshot of this is that the produced
> .pcm
> file will track information for headers in their original locations (where
> the
> module was preprocessed), not relative to whatever directory the
> preprocessed
> module map was in when it was built.
>
> Modified:
> cfe/trunk/include/clang/Basic/Module.h
> cfe/trunk/include/clang/Lex/HeaderSearch.h
> cfe/trunk/lib/Frontend/FrontendAction.cpp
> cfe/trunk/lib/Lex/HeaderSearch.cpp
> cfe/trunk/lib/Serialization/ASTWriter.cpp
> cfe/trunk/test/Modules/preprocess-module.cpp
> cfe/trunk/test/Modules/preprocess-nested.cpp
>
> Modified: cfe/trunk/include/clang/Basic/Module.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/
> clang/Basic/Module.h?rev=304346=304345=304346=diff
> 
> ==
> --- cfe/trunk/include/clang/Basic/Module.h (original)
> +++ cfe/trunk/include/clang/Basic/Module.h Wed May 31 15:56:55 2017
> @@ -83,6 +83,10 @@ public:
>/// are found.
>const DirectoryEntry *Directory;
>
> +  /// \brief The presumed file name for the module map defining this
> module.
> +  /// Only non-empty when building from preprocessed source.
> +  std::string PresumedModuleMapFile;
> +
>/// \brief The umbrella header or directory.
>llvm::PointerUnion Umbrella;
>
>
> Modified: cfe/trunk/include/clang/Lex/HeaderSearch.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/
> clang/Lex/HeaderSearch.h?rev=304346=304345=304346=diff
> 
> ==
> --- cfe/trunk/include/clang/Lex/HeaderSearch.h (original)
> +++ cfe/trunk/include/clang/Lex/HeaderSearch.h Wed May 31 15:56:55 2017
> @@ -543,10 +543,13 @@ public:
>/// \param Offset [inout] An offset within ID to start parsing. On exit,
>///filled by the end of the parsed contents (either EOF or the
>///location of an end-of-module-map pragma).
> -  ///
> +  /// \param OriginalModuleMapFile The original path to the module map
> file,
> +  ///used to resolve paths within the module (this is required
> when
> +  ///building the module from preprocessed source).
>/// \returns true if an error occurred, false otherwise.
>bool loadModuleMapFile(const FileEntry *File, bool IsSystem,
> - FileID ID = FileID(), unsigned *Offset =
> nullptr);
> + FileID ID = FileID(), unsigned *Offset = nullptr,
> + StringRef OriginalModuleMapFile = StringRef());
>
>/// \brief Collect the set of all known, top-level modules.
>///
>
> Modified: cfe/trunk/lib/Frontend/FrontendAction.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/
> Frontend/FrontendAction.cpp?rev=304346=304345=304346=diff
> 
> ==
> --- cfe/trunk/lib/Frontend/FrontendAction.cpp (original)
> +++ cfe/trunk/lib/Frontend/FrontendAction.cpp Wed May 31 15:56:55 2017
> @@ -373,10 +373,11 @@ collectModuleHeaderIncludes(const LangOp
>return std::error_code();
>  }
>
> -static bool
> -loadModuleMapForModuleBuild(CompilerInstance , StringRef Filename,
> -bool IsSystem, bool IsPreprocessed,
> -unsigned ) {
> +static bool loadModuleMapForModuleBuild(CompilerInstance ,
> +StringRef Filename, bool IsSystem,
> +bool IsPreprocessed,
> +std::string
> ,
> +unsigned ) {
>auto  = CI.getSourceManager();
>HeaderSearch  = CI.getPreprocessor().getHeaderSearchInfo();
>
> @@ -388,16 +389,15 @@ loadModuleMapForModuleBuild(CompilerInst
>// line directives are not part of the module map syntax in general.
>Offset = 0;
>if (IsPreprocessed) {
> -std::string PresumedModuleMapFile;
>  SourceLocation EndOfLineMarker =
>  ReadOriginalFileName(CI, 

Re: r304346 - [modules] When compiling a preprocessed module map, look for headers relative

2017-06-01 Thread Yaron Keren via cfe-commits
Hi Richard,

This broke the tests on the Windows bot:

http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/5266

   1. FAIL: Clang::preprocess-nested.cpp
   

   2. FAIL: Clang::preprocess-module.cpp
   


r304345 was OK
http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/5265

Yaron


‫בתאריך יום ד׳, 31 במאי 2017 ב-23:57 מאת ‪Richard Smith via cfe-commits‬‏ <‪
cfe-commits@lists.llvm.org‬‏>:‬

> Author: rsmith
> Date: Wed May 31 15:56:55 2017
> New Revision: 304346
>
> URL: http://llvm.org/viewvc/llvm-project?rev=304346=rev
> Log:
> [modules] When compiling a preprocessed module map, look for headers
> relative
> to the original module map.
>
> Also use the path and name of the original module map when emitting that
> information into the .pcm file. The upshot of this is that the produced
> .pcm
> file will track information for headers in their original locations (where
> the
> module was preprocessed), not relative to whatever directory the
> preprocessed
> module map was in when it was built.
>
> Modified:
> cfe/trunk/include/clang/Basic/Module.h
> cfe/trunk/include/clang/Lex/HeaderSearch.h
> cfe/trunk/lib/Frontend/FrontendAction.cpp
> cfe/trunk/lib/Lex/HeaderSearch.cpp
> cfe/trunk/lib/Serialization/ASTWriter.cpp
> cfe/trunk/test/Modules/preprocess-module.cpp
> cfe/trunk/test/Modules/preprocess-nested.cpp
>
> Modified: cfe/trunk/include/clang/Basic/Module.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Module.h?rev=304346=304345=304346=diff
>
> ==
> --- cfe/trunk/include/clang/Basic/Module.h (original)
> +++ cfe/trunk/include/clang/Basic/Module.h Wed May 31 15:56:55 2017
> @@ -83,6 +83,10 @@ public:
>/// are found.
>const DirectoryEntry *Directory;
>
> +  /// \brief The presumed file name for the module map defining this
> module.
> +  /// Only non-empty when building from preprocessed source.
> +  std::string PresumedModuleMapFile;
> +
>/// \brief The umbrella header or directory.
>llvm::PointerUnion Umbrella;
>
>
> Modified: cfe/trunk/include/clang/Lex/HeaderSearch.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/HeaderSearch.h?rev=304346=304345=304346=diff
>
> ==
> --- cfe/trunk/include/clang/Lex/HeaderSearch.h (original)
> +++ cfe/trunk/include/clang/Lex/HeaderSearch.h Wed May 31 15:56:55 2017
> @@ -543,10 +543,13 @@ public:
>/// \param Offset [inout] An offset within ID to start parsing. On exit,
>///filled by the end of the parsed contents (either EOF or the
>///location of an end-of-module-map pragma).
> -  ///
> +  /// \param OriginalModuleMapFile The original path to the module map
> file,
> +  ///used to resolve paths within the module (this is required
> when
> +  ///building the module from preprocessed source).
>/// \returns true if an error occurred, false otherwise.
>bool loadModuleMapFile(const FileEntry *File, bool IsSystem,
> - FileID ID = FileID(), unsigned *Offset =
> nullptr);
> + FileID ID = FileID(), unsigned *Offset = nullptr,
> + StringRef OriginalModuleMapFile = StringRef());
>
>/// \brief Collect the set of all known, top-level modules.
>///
>
> Modified: cfe/trunk/lib/Frontend/FrontendAction.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FrontendAction.cpp?rev=304346=304345=304346=diff
>
> ==
> --- cfe/trunk/lib/Frontend/FrontendAction.cpp (original)
> +++ cfe/trunk/lib/Frontend/FrontendAction.cpp Wed May 31 15:56:55 2017
> @@ -373,10 +373,11 @@ collectModuleHeaderIncludes(const LangOp
>return std::error_code();
>  }
>
> -static bool
> -loadModuleMapForModuleBuild(CompilerInstance , StringRef Filename,
> -bool IsSystem, bool IsPreprocessed,
> -unsigned ) {
> +static bool loadModuleMapForModuleBuild(CompilerInstance ,
> +StringRef Filename, bool IsSystem,
> +bool IsPreprocessed,
> +std::string
> ,
> +unsigned ) {
>auto  = CI.getSourceManager();
>HeaderSearch  = CI.getPreprocessor().getHeaderSearchInfo();
>
> @@ -388,16 +389,15 @@ loadModuleMapForModuleBuild(CompilerInst
>// line directives are not part of the module map syntax in general.
>Offset = 0;