From bd3306aecb3a15e8967143b8cdbbccf2b1b19b74 Mon Sep 17 00:00:00 2001 From: patrick Date: Sat, 14 Jan 2017 19:55:43 +0000 Subject: Import LLVM 3.9.1 including clang and lld. --- gnu/llvm/tools/clang/lib/Lex/Preprocessor.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gnu/llvm/tools/clang/lib/Lex/Preprocessor.cpp') diff --git a/gnu/llvm/tools/clang/lib/Lex/Preprocessor.cpp b/gnu/llvm/tools/clang/lib/Lex/Preprocessor.cpp index 142d9ce0904..78179dd7988 100644 --- a/gnu/llvm/tools/clang/lib/Lex/Preprocessor.cpp +++ b/gnu/llvm/tools/clang/lib/Lex/Preprocessor.cpp @@ -51,8 +51,11 @@ #include "llvm/Support/ConvertUTF.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/raw_ostream.h" +#include using namespace clang; +template class llvm::Registry; + //===----------------------------------------------------------------------===// ExternalPreprocessorSource::~ExternalPreprocessorSource() { } @@ -62,7 +65,7 @@ Preprocessor::Preprocessor(IntrusiveRefCntPtr PPOpts, ModuleLoader &TheModuleLoader, IdentifierInfoLookup *IILookup, bool OwnsHeaders, TranslationUnitKind TUKind) - : PPOpts(PPOpts), Diags(&diags), LangOpts(opts), Target(nullptr), + : PPOpts(std::move(PPOpts)), Diags(&diags), LangOpts(opts), Target(nullptr), AuxTarget(nullptr), FileMgr(Headers.getFileMgr()), SourceMgr(SM), ScratchBuf(new ScratchBuffer(SourceMgr)), HeaderInfo(Headers), TheModuleLoader(TheModuleLoader), ExternalSource(nullptr), @@ -477,7 +480,7 @@ void Preprocessor::CreateString(StringRef Str, Token &Tok, } Module *Preprocessor::getCurrentModule() { - if (getLangOpts().CurrentModule.empty()) + if (!getLangOpts().CompilingModule) return nullptr; return getHeaderSearchInfo().lookupModule(getLangOpts().CurrentModule); -- cgit v1.2.3-59-g8ed1b