From 1ae02f68bea80c5114b808455b922667339f4c90 Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Fri, 2 May 2014 03:43:30 +0000 Subject: Factor TargetInfo pointer/DelayInitialization bool pair out of Preprocessor ctor The Preprocessor::Initialize() function already offers a clear interface to achieve this, further reducing the confusing number of states a newly constructed preprocessor can have. llvm-svn: 207825 --- clang/unittests/Basic/SourceManagerTest.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'clang/unittests/Basic') diff --git a/clang/unittests/Basic/SourceManagerTest.cpp b/clang/unittests/Basic/SourceManagerTest.cpp index 88c3fb76ca0..5f39bd41f68 100644 --- a/clang/unittests/Basic/SourceManagerTest.cpp +++ b/clang/unittests/Basic/SourceManagerTest.cpp @@ -80,11 +80,11 @@ TEST_F(SourceManagerTest, isBeforeInTranslationUnit) { VoidModuleLoader ModLoader; HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, &*Target); - 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 toks; @@ -195,11 +195,11 @@ TEST_F(SourceManagerTest, getMacroArgExpandedLocation) { VoidModuleLoader ModLoader; HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, &*Target); - 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 toks; @@ -293,11 +293,11 @@ TEST_F(SourceManagerTest, isBeforeInTranslationUnitWithMacroInInclude) { VoidModuleLoader ModLoader; HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, &*Target); - 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); std::vector Macros; PP.addPPCallbacks(new MacroTracker(Macros)); -- cgit v1.2.3