/freebsd/contrib/llvm-project/clang/include/clang/Basic/ |
H A D | SourceManager.h | 891 void setMainFileID(FileID FID) { in setMainFileID() argument 892 MainFileID = FID; in setMainFileID() 1051 getBufferOrNone(FileID FID, SourceLocation Loc = SourceLocation()) const { 1052 if (auto *Entry = getSLocEntryForFile(FID)) 1063 getBufferOrFake(FileID FID, SourceLocation Loc = SourceLocation()) const { 1064 if (auto B = getBufferOrNone(FID, Loc)) 1070 const FileEntry *getFileEntryForID(FileID FID) const { in getFileEntryForID() argument 1071 if (auto FE = getFileEntryRefForID(FID)) in getFileEntryForID() 1077 OptionalFileEntryRef getFileEntryRefForID(FileID FID) const { in getFileEntryRefForID() argument 1078 if (auto *Entry = getSLocEntryForFile(FID)) in getFileEntryRefForID() [all …]
|
H A D | SourceManagerInternals.h | 110 void AddLineNote(FileID FID, unsigned Offset, 118 const LineEntry *FindNearestLineEntry(FileID FID, unsigned Offset); 128 void AddEntry(FileID FID, const std::vector<LineEntry> &Entries);
|
/freebsd/contrib/llvm-project/clang/lib/Rewrite/ |
H A D | HTMLRewrite.cpp | 39 FileID FID = SM.getFileID(B); in HighlightRange() local 40 assert(SM.getFileID(E) == FID && "B/E not in the same file!"); in HighlightRange() 50 const char *BufferStart = SM.getBufferData(FID, &Invalid).data(); in HighlightRange() 54 HighlightRange(R.getEditBuffer(FID), BOffset, EOffset, in HighlightRange() 135 void html::EscapeText(Rewriter &R, FileID FID, in EscapeText() argument 138 llvm::MemoryBufferRef Buf = R.getSourceMgr().getBufferOrFake(FID); in EscapeText() 144 RewriteBuffer &RB = R.getEditBuffer(FID); in EscapeText() 255 void html::AddLineNumbers(Rewriter& R, FileID FID) { in AddLineNumbers() argument 257 llvm::MemoryBufferRef Buf = R.getSourceMgr().getBufferOrFake(FID); in AddLineNumbers() 261 RewriteBuffer &RB = R.getEditBuffer(FID); in AddLineNumbers() [all …]
|
H A D | TokenRewriter.cpp | 26 TokenRewriter::TokenRewriter(FileID FID, SourceManager &SM, in TokenRewriter() argument 31 llvm::MemoryBufferRef FromFile = SM.getBufferOrFake(FID); in TokenRewriter() 32 Lexer RawLex(FID, FromFile, SM, LangOpts); in TokenRewriter()
|
/freebsd/contrib/llvm-project/clang/include/clang/Edit/ |
H A D | FileOffset.h | 19 FileID FID; variable 24 FileOffset(FileID fid, unsigned offs) : FID(fid), Offs(offs) {} in FileOffset() 26 bool isInvalid() const { return FID.isInvalid(); } in isInvalid() 28 FileID getFID() const { return FID; } in getFID() 38 return LHS.FID == RHS.FID && LHS.Offs == RHS.Offs; 46 return std::tie(LHS.FID, LHS.Offs) < std::tie(RHS.FID, RHS.Offs);
|
/freebsd/contrib/llvm-project/clang/lib/Basic/ |
H A D | SourceManager.cpp | 211 void LineTableInfo::AddLineNote(FileID FID, unsigned Offset, unsigned LineNo, in AddLineNote() argument 214 std::vector<LineEntry> &Entries = LineEntries[FID]; in AddLineNote() 230 PrevEntry = FindNearestLineEntry(FID, PrevEntry->IncludeOffset); in AddLineNote() 248 const LineEntry *LineTableInfo::FindNearestLineEntry(FileID FID, in FindNearestLineEntry() argument 250 const std::vector<LineEntry> &Entries = LineEntries[FID]; in FindNearestLineEntry() 267 void LineTableInfo::AddEntry(FileID FID, in AddEntry() argument 269 LineEntries[FID] = Entries; in AddEntry() 505 FileID SourceManager::getPreviousFileID(FileID FID) const { in getPreviousFileID() 506 if (FID.isInvalid()) in getPreviousFileID() 509 int ID = FID.ID; in getPreviousFileID() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/Index/ |
H A D | FileIndexRecord.h | 28 FileID FID; 34 FileIndexRecord(FileID FID, bool IsSystem) : FID(FID), IsSystem(IsSystem) {} in FileIndexRecord() argument 38 FileID getFileID() const { return FID; } in getFileID()
|
/freebsd/contrib/llvm-project/clang/include/clang/Rewrite/Core/ |
H A D | HTMLRewrite.h | 62 void EscapeText(Rewriter& R, FileID FID, 72 void AddLineNumbers(Rewriter& R, FileID FID); 74 void AddHeaderFooterInternalBuiltinCSS(Rewriter &R, FileID FID, 79 void SyntaxHighlight(Rewriter &R, FileID FID, const Preprocessor &PP, 86 void HighlightMacros(Rewriter &R, FileID FID, const Preprocessor &PP,
|
H A D | Rewriter.h | 194 RewriteBuffer &getEditBuffer(FileID FID); 198 const RewriteBuffer *getRewriteBufferFor(FileID FID) const { in getRewriteBufferFor() argument 200 RewriteBuffers.find(FID); in getRewriteBufferFor() 218 unsigned getLocationOffsetAndFileID(SourceLocation Loc, FileID &FID) const;
|
/freebsd/contrib/llvm-project/clang/lib/Tooling/Syntax/ |
H A D | TokenBufferTokenManager.cpp | 18 auto FID = SM.createFileID(std::move(Input)); in lexBuffer() local 19 auto It = ExtraTokens.try_emplace(FID, tokenize(FID, SM, LangOpts)); in lexBuffer() 21 return {FID, It.first->second}; in lexBuffer()
|
H A D | Tokens.cpp | 380 llvm::ArrayRef<syntax::Token> TokenBuffer::spelledTokens(FileID FID) const { in spelledTokens() 381 auto It = Files.find(FID); in spelledTokens() 420 FileID FID = SourceMgr->getFileID(FirstSpelled->location()); in spelledForExpanded() local 422 if (FID != SourceMgr->getFileID(LastSpelled->location())) in spelledForExpanded() 425 const MarkedFile &File = Files.find(FID)->second; in spelledForExpanded() 440 First->location(), Last->location(), Prev, Next, FID, *SourceMgr); in spelledForExpanded() 561 TokenBuffer::macroExpansions(FileID FID) const { in macroExpansions() 562 auto FileIt = Files.find(FID); in macroExpansions() 608 std::vector<syntax::Token> syntax::tokenize(FileID FID, const SourceManager &SM, in tokenize() argument 610 return tokenize(syntax::FileRange(FID, 0, SM.getFileIDSize(FID)), SM, LO); in tokenize() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ |
H A D | HTMLDiagnostics.cpp | 118 FileID FID, FileEntryRef Entry, const char *declName); 121 void RewriteFile(Rewriter &R, const PathPieces &path, FileID FID); 385 FileID FID = I->getLocation().asLocation().getExpansionLoc().getFileID(); in GenerateHTML() local 386 if (llvm::is_contained(FileIDs, FID)) in GenerateHTML() 389 FileIDs.push_back(FID); in GenerateHTML() 390 RewriteFile(R, path, FID); in GenerateHTML() 440 FileID FID = in GenerateHTML() local 442 OptionalFileEntryRef Entry = SMgr.getFileEntryRefForID(FID); in GenerateHTML() 552 const PathPieces &path, FileID FID, in FinalizeHTML() argument 568 R.InsertTextBefore(SMgr.getLocForStartOfFile(FID), showHelpJavascript()); in FinalizeHTML() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/Frontend/ |
H A D | VerifyDiagnosticConsumer.cpp | 558 FileID FID = SM.translateFile(*File); in ParseDirective() local 559 if (FID.isInvalid()) in ParseDirective() 560 FID = SM.createFileID(*File, Pos, SrcMgr::C_User); in ParseDirective() 563 ExpectedLoc = SM.translateLineCol(FID, Line, 1); in ParseDirective() 566 ExpectedLoc = SM.translateLineCol(FID, 1, 1); in ParseDirective() 749 FileID FID = SrcManager->getFileID(Loc); in HandleDiagnostic() local 751 auto FE = SrcManager->getFileEntryRefForID(FID); in HandleDiagnostic() 752 if (FE && CurrentPreprocessor && SrcManager->isLoadedFileID(FID)) { in HandleDiagnostic() 760 UpdateParsedFileStatus(*SrcManager, FID, PS); in HandleDiagnostic() 831 static bool findDirectives(SourceManager &SM, FileID FID, in findDirectives() argument [all …]
|
H A D | TextDiagnostic.cpp | 789 if (FileID FID = Loc.getFileID(); FID.isValid()) { in emitDiagnosticLoc() local 913 findLinesForRange(const CharSourceRange &R, FileID FID, in findLinesForRange() argument 920 if (SM.getFileID(Begin) != FID || SM.getFileID(End) != FID) in findLinesForRange() 1001 static std::string buildFixItInsertionLine(FileID FID, in buildFixItInsertionLine() argument 1020 if (FID == HintLocInfo.first && in buildFixItInsertionLine() 1081 const std::pair<unsigned, unsigned> &Lines, FileID FID, in prepareAndFilterRanges() argument 1092 if (StartLineNo > Lines.second || SM.getFileID(Begin) != FID) in prepareAndFilterRanges() 1096 if (EndLineNo < Lines.first || SM.getFileID(End) != FID) in prepareAndFilterRanges() 1134 const LangOptions &LangOpts, bool ShowColors, FileID FID, in highlightLines() argument 1149 Lexer L{FID, *Buff, SM, LangOpts}; in highlightLines() [all …]
|
H A D | ASTUnit.cpp | 2400 FileID FID = SrcMgr.translateFile(*FE); in TranslateStoredDiagnostics() local 2401 FileLoc = SrcMgr.getLocForStartOfFile(FID); in TranslateStoredDiagnostics() 2455 FileID FID; in addFileLevelDecl() local 2457 std::tie(FID, Offset) = SM.getDecomposedLoc(FileLoc); in addFileLevelDecl() 2458 if (FID.isInvalid()) in addFileLevelDecl() 2461 std::unique_ptr<LocDeclsTy> &Decls = FileDecls[FID]; in addFileLevelDecl() 2578 FileID FID; in isInPreambleFileID() local 2580 FID = SourceMgr->getPreambleFileID(); in isInPreambleFileID() 2582 if (Loc.isInvalid() || FID.isInvalid()) in isInPreambleFileID() 2585 return SourceMgr->isInFileID(Loc, FID); in isInPreambleFileID() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/Lex/ |
H A D | PreprocessingRecord.cpp | 78 static bool isPreprocessedEntityIfInFileID(PreprocessedEntity *PPE, FileID FID, in isPreprocessedEntityIfInFileID() argument 80 assert(FID.isValid()); in isPreprocessedEntityIfInFileID() 88 return SM.isInFileID(SM.getFileLoc(Loc), FID); in isPreprocessedEntityIfInFileID() 98 bool PreprocessingRecord::isEntityInFileID(iterator PPEI, FileID FID) { in isEntityInFileID() argument 99 if (FID.isInvalid()) in isEntityInFileID() 111 return isPreprocessedEntityIfInFileID(PPE, FID, SourceMgr); in isEntityInFileID() 116 ExternalSource->isPreprocessedEntityInFileID(LoadedIndex, FID)) in isEntityInFileID() 123 FID, SourceMgr); in isEntityInFileID() 131 FID, SourceMgr); in isEntityInFileID()
|
H A D | ScratchBuffer.cpp | 80 FileID FID = SourceMgr.createFileID(std::move(OwnBuf)); in AllocScratchBuffer() local 81 BufferStartLoc = SourceMgr.getLocForStartOfFile(FID); in AllocScratchBuffer()
|
H A D | PPLexerChange.cpp | 69 bool Preprocessor::EnterSourceFile(FileID FID, ConstSearchDirIterator CurDir, in EnterSourceFile() argument 80 getSourceManager().getBufferOrNone(FID, Loc); in EnterSourceFile() 82 SourceLocation FileStart = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile() 89 SourceMgr.getFileEntryForID(FID) == CodeCompletionFile) { in EnterSourceFile() 90 CodeCompletionFileLoc = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile() 95 Lexer *TheLexer = new Lexer(FID, *InputFile, *this, IsFirstIncludeOfFile); in EnterSourceFile() 97 FID != PredefinesFileID) { in EnterSourceFile() 98 if (OptionalFileEntryRef File = SourceMgr.getFileEntryRefForID(FID)) { in EnterSourceFile()
|
/freebsd/contrib/llvm-project/clang/lib/Parse/ |
H A D | ParseStmtAsm.cpp | 387 FileID FID; in ParseMicrosoftAsmStatement() local 404 FID = ExpAsmLoc.first; in ParseMicrosoftAsmStatement() 405 LineNo = SrcMgr.getLineNumber(FID, ExpAsmLoc.second); in ParseMicrosoftAsmStatement() 432 FID = ExpSemiLoc.first; in ParseMicrosoftAsmStatement() 433 LineNo = SrcMgr.getLineNumber(FID, ExpSemiLoc.second); in ParseMicrosoftAsmStatement() 440 if (ExpLoc.first != FID || in ParseMicrosoftAsmStatement() 461 FID = ExpLoc.first; in ParseMicrosoftAsmStatement() 462 LineNo = SrcMgr.getLineNumber(FID, ExpLoc.second); in ParseMicrosoftAsmStatement()
|
/freebsd/contrib/llvm-project/clang/include/clang/Tooling/Syntax/ |
H A D | Tokens.h | 293 llvm::ArrayRef<syntax::Token> spelledTokens(FileID FID) const; 307 std::vector<const syntax::Token *> macroExpansions(FileID FID) const; 405 std::vector<syntax::Token> tokenize(FileID FID, const SourceManager &SM,
|
/freebsd/contrib/llvm-project/clang/lib/ARCMigrate/ |
H A D | ObjCMT.cpp | 161 bool canModifyFile(FileID FID) { in canModifyFile() argument 162 if (FID.isInvalid()) in canModifyFile() 164 return canModifyFile(PP.getSourceManager().getFileEntryRefForID(FID)); in canModifyFile() 177 FileID FID = PP.getSourceManager().getFileID(D->getLocation()); in canModify() local 178 return canModifyFile(FID); in canModify() 1782 FileID FID; in writeLoc() local 1784 std::tie(FID, Offset) = SourceMgr.getDecomposedLoc(Loc); in writeLoc() 1785 assert(FID.isValid()); in writeLoc() 1787 StringRef(SourceMgr.getFileEntryRefForID(FID)->getName()); in writeLoc() 1841 FileID FID = PP.getSourceManager().getFileID((*D)->getLocation()); in HandleTranslationUnit() local [all …]
|
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
H A D | ObjCUnusedIVarsChecker.cpp | 95 static void Scan(IvarUsageMap &M, const DeclContext *C, const FileID FID, in Scan() argument 100 if (SM.getFileID(L) == FID) in Scan()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/MC/ |
H A D | MCCodeView.h | 76 void setFunctionId(unsigned FID) { FunctionId = FID; } in setFunctionId() argument
|
/freebsd/contrib/llvm-project/lldb/source/Plugins/Language/ClangCommon/ |
H A D | ClangHighlighter.cpp | 172 FileID FID = SM.createFileID(buf->getMemBufferRef()); in Highlight() local 182 Lexer lex(FID, buf->getMemBufferRef(), SM, Opts); in Highlight()
|
/freebsd/contrib/llvm-project/clang/lib/Format/ |
H A D | MacroExpander.cpp | 137 FileID FID = SourceMgr.createFileID(Buffers.back()->getMemBufferRef()); in parseDefinition() local 138 FormatTokenLexer Lex(SourceMgr, FID, 0, Style, encoding::Encoding_UTF8, in parseDefinition()
|