Lines Matching full:clang
28 #include "clang/AST/ASTConsumer.h"
29 #include "clang/AST/ASTContext.h"
31 #include "clang/Basic/DiagnosticIDs.h"
32 #include "clang/Basic/DiagnosticOptions.h"
33 #include "clang/Basic/FileManager.h"
34 #include "clang/Basic/FileSystemOptions.h"
35 #include "clang/Basic/SourceLocation.h"
36 #include "clang/Basic/SourceManager.h"
37 #include "clang/Basic/TargetInfo.h"
38 #include "clang/Basic/TargetOptions.h"
40 #include "clang/Frontend/DependencyOutputOptions.h"
41 #include "clang/Frontend/FrontendDiagnostic.h"
42 #include "clang/Frontend/FrontendOptions.h"
43 #include "clang/Frontend/PCHContainerOperations.h"
44 #include "clang/Frontend/TextDiagnosticPrinter.h"
45 #include "clang/Frontend/Utils.h"
47 #include "clang/Lex/HeaderSearch.h"
48 #include "clang/Lex/HeaderSearchOptions.h"
49 #include "clang/Lex/Preprocessor.h"
50 #include "clang/Lex/PreprocessorOptions.h"
52 #include "clang/Parse/ParseAST.h"
54 #include "clang/Sema/SemaDiagnostic.h"
135 clang::DiagnosticsEngine *DiagEngine) {
146 DiagEngine->Report(clang::diag::err_fe_error_opening)
159 mTarget.reset(clang::TargetInfo::CreateTargetInfo(*mDiagEngine,
164 mFileSysOpt.reset(new clang::FileSystemOptions());
165 mFileMgr.reset(new clang::FileManager(*mFileSysOpt));
169 mSourceMgr.reset(new clang::SourceManager(*mDiagEngine, *mFileMgr));
174 clang::HeaderSearch *HeaderInfo = new clang::HeaderSearch(&getHeaderSearchOpts(),
180 mPP.reset(new clang::Preprocessor(&getPreprocessorOpts(),
190 clang::FrontendOptions FEOpts;
194 clang::InitializePreprocessor(*mPP, getPreprocessorOpts(), *Reader, FEOpts);
196 clang::ApplyHeaderSearchOptions(*HeaderInfo, getHeaderSearchOpts(), LangOpts,
201 std::vector<clang::DirectoryLookup> SearchList;
203 if (const clang::DirectoryEntry *DE =
205 SearchList.push_back(clang::DirectoryLookup(DE,
206 clang::SrcMgr::C_System,
221 new clang::ASTContext(LangOpts, *mSourceMgr, mPP->getIdentifierTable(),
227 clang::ASTConsumer *
228 Slang::createBackend(const RSCCOptions &Opts, const clang::CodeGenOptions &CodeGenOpts,
238 Slang::Slang(uint32_t BitWidth, clang::DiagnosticsEngine *DiagEngine,
241 mTargetOpts(new clang::TargetOptions()),
242 mHSOpts(new clang::HeaderSearchOptions()),
243 mPPOpts(new clang::PreprocessorOptions()),
244 mPCHContainerOperations(std::make_shared<clang::PCHContainerOperations>()),
247 // Please refer to include/clang/Basic/LangOptions.h to setup
259 // Clang driver to pass this option (-mstackrealign) directly to cc1.
260 // Since we don't use Clang's driver, we need to similarly supply it.
280 clang::ModuleLoadResult Slang::loadModule(
281 clang::SourceLocation ImportLoc,
282 clang::ModuleIdPath Path,
283 clang::Module::NameVisibilityKind Visibility,
286 return clang::ModuleLoadResult();
294 const clang::FileEntry *File = mFileMgr->getFile(InputFile);
297 clang::SourceLocation(), clang::SrcMgr::C_User));
301 mDiagEngine->Report(clang::diag::err_fe_error_reading) << InputFile;
361 clang::DependencyOutputOptions DepOpts;
378 clang::DependencyFileGenerator::CreateAndAttachToPreprocessor(*mPP.get(), DepOpts);
384 clang::Token Tok;
388 } while (Tok.isNot(clang::tok::eof));
437 CodeGenOpts.setDebugInfo(clang::codegenoptions::FullDebugInfo);
439 CodeGenOpts.setDebugInfo(clang::codegenoptions::NoDebugInfo);
503 clang::DiagnosticsEngine::Error,
528 clang::Preprocessor &PP = getPreprocessor();
555 bool Slang::IsLocInRSHeaderFile(const clang::SourceLocation &Loc,
556 const clang::SourceManager &SourceMgr) {
557 clang::FullSourceLoc FSL(Loc, SourceMgr);
558 clang::PresumedLoc PLoc = SourceMgr.getPresumedLoc(FSL);
573 clang::DiagnosticOptions &DiagOpts,
580 clang::DiagnosticsEngine::Error,
613 clang::DiagnosticsEngine::Error,