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

Warren Ristow via cfe-commits cfe-commits at lists.llvm.org
Mon May 2 10:37:51 PDT 2016


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 way to determine whether Clang is generating a PCH file?  One alternative approach considered was to put a reference to `FrontendOptions` into the `Preprocessor` class (it already includes a reference to `LangOpts`, for example).


http://reviews.llvm.org/D19815





More information about the cfe-commits mailing list