diff options
Diffstat (limited to 'clang/unittests/Lex')
-rw-r--r-- | clang/unittests/Lex/LexerTest.cpp | 6 | ||||
-rw-r--r-- | clang/unittests/Lex/PPCallbacksTest.cpp | 10 | ||||
-rw-r--r-- | clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp | 6 |
3 files changed, 10 insertions, 12 deletions
diff --git a/clang/unittests/Lex/LexerTest.cpp b/clang/unittests/Lex/LexerTest.cpp index 0faad459837..57b5c909e0a 100644 --- a/clang/unittests/Lex/LexerTest.cpp +++ b/clang/unittests/Lex/LexerTest.cpp @@ -69,10 +69,10 @@ protected: VoidModuleLoader ModLoader; HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, Target.getPtr()); - Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, Target.getPtr(), + Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr, HeaderInfo, ModLoader, /*IILookup =*/ 0, - /*OwnsHeaderSearch =*/ false, - /*DelayInitialization =*/ false); + /*OwnsHeaderSearch =*/ false); + PP.Initialize(*Target); PP.EnterMainSourceFile(); std::vector<Token> toks; diff --git a/clang/unittests/Lex/PPCallbacksTest.cpp b/clang/unittests/Lex/PPCallbacksTest.cpp index bdc026a223c..c5013a7671c 100644 --- a/clang/unittests/Lex/PPCallbacksTest.cpp +++ b/clang/unittests/Lex/PPCallbacksTest.cpp @@ -173,11 +173,10 @@ protected: IntrusiveRefCntPtr<PreprocessorOptions> PPOpts = new PreprocessorOptions(); Preprocessor PP(PPOpts, Diags, LangOpts, - Target.getPtr(), SourceMgr, HeaderInfo, ModLoader, /*IILookup =*/ 0, - /*OwnsHeaderSearch =*/false, - /*DelayInitialization =*/ false); + /*OwnsHeaderSearch =*/false); + PP.Initialize(*Target); InclusionDirectiveCallbacks* Callbacks = new InclusionDirectiveCallbacks; PP.addPPCallbacks(Callbacks); // Takes ownership. @@ -208,11 +207,10 @@ protected: OpenCLLangOpts, Target.getPtr()); Preprocessor PP(new PreprocessorOptions(), Diags, OpenCLLangOpts, - Target.getPtr(), SourceMgr, HeaderInfo, ModLoader, /*IILookup =*/ 0, - /*OwnsHeaderSearch =*/false, - /*DelayInitialization =*/ false); + /*OwnsHeaderSearch =*/false); + PP.Initialize(*Target); // parser actually sets correct pragma handlers for preprocessor // according to LangOptions, so we init Parser to register opencl diff --git a/clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp b/clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp index bacc899becc..3028f60b57f 100644 --- a/clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp +++ b/clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp @@ -97,11 +97,11 @@ TEST_F(PPConditionalDirectiveRecordTest, PPRecAPI) { VoidModuleLoader ModLoader; HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, Target.getPtr()); - Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts,Target.getPtr(), + Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr, HeaderInfo, ModLoader, /*IILookup =*/ 0, - /*OwnsHeaderSearch =*/false, - /*DelayInitialization =*/ false); + /*OwnsHeaderSearch =*/false); + PP.Initialize(*Target); PPConditionalDirectiveRecord * PPRec = new PPConditionalDirectiveRecord(SourceMgr); PP.addPPCallbacks(PPRec); |