Home | History | Annotate | Download | only in Frontend

Lines Matching refs:Clang

15 #include "clang/Basic/TargetInfo.h"
16 #include "clang/Frontend/ASTUnit.h"
17 #include "clang/Frontend/CompilerInstance.h"
18 #include "clang/Frontend/TextDiagnosticPrinter.h"
19 #include "clang/Lex/Preprocessor.h"
20 #include "clang/Parse/ParseAST.h"
21 #include "clang/Serialization/ASTReader.h"
22 #include "clang/Serialization/ASTWriter.h"
25 using namespace clang;
112 IntrusiveRefCntPtr<ExternalSemaSource> clang::createChainedIncludesSource(
147 std::unique_ptr<CompilerInstance> Clang(new CompilerInstance());
148 Clang->setInvocation(CInvok.release());
149 Clang->setDiagnostics(Diags.get());
150 Clang->setTarget(TargetInfo::CreateTargetInfo(
151 Clang->getDiagnostics(), Clang->getInvocation().TargetOpts));
152 Clang->createFileManager();
153 Clang->createSourceManager(Clang->getFileManager());
154 Clang->createPreprocessor(TU_Prefix);
155 Clang->getDiagnosticClient().BeginSourceFile(Clang->getLangOpts(),
156 &Clang->getPreprocessor());
157 Clang->createASTContext();
162 consumer.reset(new PCHGenerator(Clang->getPreprocessor(), "-", nullptr,
164 Clang->getASTContext().setASTMutationListener(
166 Clang->setASTConsumer(consumer.release());
167 Clang->createSema(TU_Prefix, nullptr);
170 Preprocessor &PP = Clang->getPreprocessor();
186 Reader = createASTReader(*Clang, pchName, bufs, serialBufNames,
187 Clang->getASTConsumer().GetASTDeserializationListener());
190 Clang->setModuleManager(Reader);
191 Clang->getASTContext().setExternalSource(Reader);
194 if (!Clang->InitializeSourceManager(InputFile))
197 ParseAST(Clang->getSema());
198 Clang->getDiagnosticClient().EndSourceFile();
200 source->CIs.push_back(Clang.release());