Re: [PATCH] D19815: Support '#pragma once' in headers when using PCH

2016-07-25 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL276653: Support '#pragma once' in headers when using PCH (authored by ssrivastava). Changed prior to commit: https://reviews.llvm.org/D19815?vs=57320&id=65372#toc Repository: rL LLVM https://reviews

Re: [PATCH] D19815: Support '#pragma once' in headers when using PCH

2016-07-25 Thread Warren Ristow via cfe-commits
wristow added a comment. > @wristow, if this still patches cleanly against trunk (I see that this has > been around a while) and test still pass, think this can be committed > soon-ish? It does still apply cleanly, and testing still looks good. Given that the test was adjusted as suggested by

Re: [PATCH] D19815: Support '#pragma once' in headers when using PCH

2016-07-25 Thread Steve O'Brien via cfe-commits
elsteveogrande added a comment. Looks like I have the "accept" ability in this repo, wasn't sure since I just registered for this recently :) I think since the tests look good, it's a nice and elegant 1-line change, per the reviewer's (@rsmith 's) comments, this should be ok to go. This would

Re: [PATCH] D19815: Support '#pragma once' in headers when using PCH

2016-06-13 Thread Warren Ristow via cfe-commits
wristow added a comment. ping http://reviews.llvm.org/D19815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19815: Support '#pragma once' in headers when using PCH

2016-05-16 Thread Warren Ristow via cfe-commits
wristow updated this revision to Diff 57320. wristow added a comment. Simplified he implementation, by using the existing `TUKind` field. http://reviews.llvm.org/D19815 Files: llvm/tools/clang/lib/Lex/Pragma.cpp llvm/tools/clang/test/PCH/Inputs/pragma-once.h llvm/tools/clang/test/PCH/prag

Re: [PATCH] D19815: Support '#pragma once' in headers when using PCH

2016-05-13 Thread Warren Ristow via cfe-commits
wristow added a comment. In http://reviews.llvm.org/D19815#428705, @rsmith wrote: > Rather than threading through a new flag, can you test the existing `TUKind` > field? Yes, that does seem to do the trick. I'll do some testing on it, but with that approach, it should be a simple one-line ch

Re: [PATCH] D19815: Support '#pragma once' in headers when using PCH

2016-05-12 Thread Richard Smith via cfe-commits
rsmith added a comment. Rather than threading through a new flag, can you test the existing `TUKind` field? http://reviews.llvm.org/D19815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D19815: Support '#pragma once' in headers when using PCH

2016-05-12 Thread Warren Ristow via cfe-commits
wristow added a comment. Ping http://reviews.llvm.org/D19815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19815: Support '#pragma once' in headers when using PCH

2016-05-02 Thread Warren Ristow via cfe-commits
wristow updated this revision to Diff 55936. wristow added a comment. Moved "test/PCH/pragma-once.h" to the "test/PCH/Inputs" directory (and changed "pragma-once.c" appropriately). http://reviews.llvm.org/D19815 Files: include/clang/Lex/PreprocessorOptions.h lib/Frontend/InitPreprocessor.c

Re: [PATCH] D19815: Support '#pragma once' in headers when using PCH

2016-05-02 Thread Reid Kleckner via cfe-commits
rnk added a subscriber: rnk. rnk added a comment. I think threading this through PP options is reasonable. Comment at: test/PCH/pragma-once.h:1 @@ +1,2 @@ +#pragma once + This should be in test/PCH/Inputs http://reviews.llvm.org/D19815 _

Re: [PATCH] D19815: Support '#pragma once' in headers when using PCH

2016-05-02 Thread Warren Ristow via cfe-commits
wristow added a comment. To check for whether we're in "generate a PCH file mode", I added a new flag (`GeneratePCHMode`) to `PreprocessorOptions`. If the `CompilerInstance` had been visible in lexical analysis, it would have been easy to do this without adding a new flag. Is there a better w

[PATCH] D19815: Support '#pragma once' in headers when using PCH

2016-05-02 Thread Warren Ristow via cfe-commits
wristow created this revision. wristow added a reviewer: rsmith. wristow added a subscriber: cfe-commits. The '#pragma once' directive was erroneously ignored when encountered in the header-file specified in generate-PCH-mode. This resulted in compile-time errors in some cases with legal code, an