[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2020-11-05 Thread Jan Wassenberg via Phabricator via cfe-commits
jan-wassenberg added a comment. @nik here's an unusual but real-world example that triggers this. https://github.com/google/highway compiles the same source multiple times (with different macros set) for generating code for multiple SIMD instruction sets. The main source file sets a macro to its

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-05-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I guess using `Edit Related Object -> Edit Commits` should do the trick. I'm not sure what the "Lean Into Action" is either. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53866/new/ https://reviews.llvm.org/D53866

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-05-10 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik closed this revision. nik added a comment. Huch, I forgot to add "Differential Revision: " to the commit message, so I'll close this manually once I know how to add the svn revision number to this. https://llvm.org/docs/Phabricator.html states: > In the web UI, under “Leap Into Action” put

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-05-10 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 198997. nik marked an inline comment as done and an inline comment as not done. nik added a comment. Renamed to err_pp_including_mainfile_in_preamble. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53866/new/

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-05-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. See the nit about naming of an error, though Comment at: include/clang/Basic/DiagnosticLexKinds.td:429

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-05-09 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik marked an inline comment as done. nik added inline comments. Comment at: lib/Basic/SourceManager.cpp:1594 SourceFileName = llvm::sys::path::filename(SourceFile->getName()); -if (*SourceFileName == llvm::sys::path::filename(MainFile->getName())) { +

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-05-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Basic/SourceManager.cpp:1594 SourceFileName = llvm::sys::path::filename(SourceFile->getName()); -if (*SourceFileName == llvm::sys::path::filename(MainFile->getName())) { +if (MainFile &&

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-05-09 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 198799. nik added a comment. Moved the MainFile / MainContentCache->OrigEntry check a bit further up, for consistency with the same test further down in SourceManager::translateFile(). Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-05-09 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik marked an inline comment as done. nik added inline comments. Comment at: lib/Basic/SourceManager.cpp:1594 SourceFileName = llvm::sys::path::filename(SourceFile->getName()); -if (*SourceFileName == llvm::sys::path::filename(MainFile->getName())) { +

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-05-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Sorry for losing this. Neat change, minimal and focused, thanks! Just wanted to clarify why we need the change in `SourceManager.cpp`, will LGTM as soon as we resolve this Comment at: lib/Basic/SourceManager.cpp:1594 SourceFileName =

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-05-08 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 198654. nik edited the summary of this revision. nik added a comment. Rebased for current trunk. If I miss something obvious, please tell me. Otherwise I'm waiting. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53866/new/

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-04-18 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Ping. Ilya? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53866/new/ https://reviews.llvm.org/D53866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-02-21 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Ping. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53866/new/ https://reviews.llvm.org/D53866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-02-14 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Ping. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53866/new/ https://reviews.llvm.org/D53866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org