diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-03-07 07:47:58 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-03-07 07:47:58 +0000 |
commit | e1974dcd92b0f27e4a8ba54887640b2a93993b40 (patch) | |
tree | bbd8e20e8b482ec5577257f8ceda44a2eaab0f1a /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 648250a2e50c00eb5c56182a7d2f2b41f74ab16e (diff) | |
download | bcm5719-llvm-e1974dcd92b0f27e4a8ba54887640b2a93993b40.tar.gz bcm5719-llvm-e1974dcd92b0f27e4a8ba54887640b2a93993b40.zip |
[Preprocessor] Pass TranslationUnitKind to the preprocessor and if it is TU_Prefix
avoid warning for unused macros.
rdar://15034698
llvm-svn: 203213
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index f10311a4ea3..be1a5402683 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -223,7 +223,7 @@ void CompilerInstance::createSourceManager(FileManager &FileMgr) { // Preprocessor -void CompilerInstance::createPreprocessor() { +void CompilerInstance::createPreprocessor(TranslationUnitKind TUKind) { const PreprocessorOptions &PPOpts = getPreprocessorOpts(); // Create a PTH manager if we are using some form of a token cache. @@ -240,7 +240,10 @@ void CompilerInstance::createPreprocessor() { PP = new Preprocessor(&getPreprocessorOpts(), getDiagnostics(), getLangOpts(), &getTarget(), getSourceManager(), *HeaderInfo, *this, PTHMgr, - /*OwnsHeaderSearch=*/true); + /*OwnsHeaderSearch=*/true, + /*DelayInitialization=*/false, + /*IncrProcessing=*/false, + TUKind); // Note that this is different then passing PTHMgr to Preprocessor's ctor. // That argument is used as the IdentifierInfoLookup argument to |