diff options
author | Alp Toker <alp@nuanti.com> | 2014-05-02 03:43:30 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2014-05-02 03:43:30 +0000 |
commit | 1ae02f68bea80c5114b808455b922667339f4c90 (patch) | |
tree | 214507eed3fc56622146dcfaf9962ac5043a71a7 /clang/lib/Lex/Preprocessor.cpp | |
parent | 23aa3532919dfcfea2b12fbd8c8d8b820104744c (diff) | |
download | bcm5719-llvm-1ae02f68bea80c5114b808455b922667339f4c90.tar.gz bcm5719-llvm-1ae02f68bea80c5114b808455b922667339f4c90.zip |
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
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r-- | clang/lib/Lex/Preprocessor.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index adbee6e3a94..ae28fc01e26 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -56,11 +56,11 @@ ExternalPreprocessorSource::~ExternalPreprocessorSource() { } Preprocessor::Preprocessor(IntrusiveRefCntPtr<PreprocessorOptions> PPOpts, DiagnosticsEngine &diags, LangOptions &opts, - const TargetInfo *target, SourceManager &SM, + SourceManager &SM, HeaderSearch &Headers, ModuleLoader &TheModuleLoader, IdentifierInfoLookup *IILookup, bool OwnsHeaders, - bool DelayInitialization, TranslationUnitKind TUKind) - : PPOpts(PPOpts), Diags(&diags), LangOpts(opts), Target(target), + TranslationUnitKind TUKind) + : PPOpts(PPOpts), Diags(&diags), LangOpts(opts), Target(0), FileMgr(Headers.getFileMgr()), SourceMgr(SM), HeaderInfo(Headers), TheModuleLoader(TheModuleLoader), ExternalSource(0), Identifiers(opts, IILookup), IncrementalProcessing(false), @@ -132,11 +132,6 @@ Preprocessor::Preprocessor(IntrusiveRefCntPtr<PreprocessorOptions> PPOpts, Ident___exception_info = Ident___exception_code = Ident___abnormal_termination = 0; Ident_GetExceptionInfo = Ident_GetExceptionCode = Ident_AbnormalTermination = 0; } - - if (!DelayInitialization) { - assert(Target && "Must provide target information for PP initialization"); - Initialize(*Target); - } } Preprocessor::~Preprocessor() { |