diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-05-06 16:33:08 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-05-06 16:33:08 +0000 |
commit | dca8ee8b7bc86076916a3a80f553f7a4e98c14af (patch) | |
tree | 0303bfa98d1f2d6aa725a8ae2dc771071c1ba685 /include/clang/Frontend/PreprocessorOptions.h | |
parent | 54ec6c59d8b2e529fc3f07ae97415721f394ad92 (diff) |
Introduce a new libclang parsing flag,
CXTranslationUnit_NestedMacroInstantiations, which indicates whether
we want to see "nested" macro instantiations (e.g., those that occur
inside other macro instantiations) within the detailed preprocessing
record. Many clients (e.g., those that only care about visible tokens)
don't care about this information, and in code that uses preprocessor
metaprogramming, this information can have a very high cost.
Addresses <rdar://problem/9389320>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130990 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/PreprocessorOptions.h')
-rw-r--r-- | include/clang/Frontend/PreprocessorOptions.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/Frontend/PreprocessorOptions.h b/include/clang/Frontend/PreprocessorOptions.h index e875ec1fef..e471c5cf1d 100644 --- a/include/clang/Frontend/PreprocessorOptions.h +++ b/include/clang/Frontend/PreprocessorOptions.h @@ -41,6 +41,10 @@ public: /// record of all macro definitions and /// instantiations. + /// \brief Whether the detailed preprocessing record includes nested macro + /// instantiations. + unsigned DetailedRecordIncludesNestedMacroInstantiations : 1; + /// The implicit PCH included at the start of the translation unit, or empty. std::string ImplicitPCHInclude; @@ -136,6 +140,7 @@ public: public: PreprocessorOptions() : UsePredefines(true), DetailedRecord(false), + DetailedRecordIncludesNestedMacroInstantiations(true), DisablePCHValidation(false), DisableStatCache(false), DumpDeserializedPCHDecls(false), PrecompiledPreambleBytes(0, true), |