Home
last modified time | relevance | path

Searched refs:FID (Results 1 – 25 of 83) sorted by relevance

1234

/external/clang/include/clang/Basic/
DSourceManager.h742 void setMainFileID(FileID FID) { in setMainFileID() argument
743 MainFileID = FID; in setMainFileID()
862 llvm::MemoryBuffer *getBuffer(FileID FID, SourceLocation Loc,
865 const SrcMgr::SLocEntry &Entry = getSLocEntry(FID, &MyInvalid);
877 llvm::MemoryBuffer *getBuffer(FileID FID, bool *Invalid = nullptr) const {
879 const SrcMgr::SLocEntry &Entry = getSLocEntry(FID, &MyInvalid);
893 const FileEntry *getFileEntryForID(FileID FID) const { in getFileEntryForID() argument
895 const SrcMgr::SLocEntry &Entry = getSLocEntry(FID, &MyInvalid); in getFileEntryForID()
919 StringRef getBufferData(FileID FID, bool *Invalid = nullptr) const;
923 unsigned getNumCreatedFIDsForFileID(FileID FID) const { in getNumCreatedFIDsForFileID() argument
[all …]
DPlistSupport.h23 FileID FID = SM.getFileID(SM.getExpansionLoc(L)); in AddFID() local
24 FIDMap::iterator I = FIDs.find(FID); in AddFID()
27 FIDs[FID] = V.size(); in AddFID()
28 V.push_back(FID); in AddFID()
33 FileID FID = SM.getFileID(SM.getExpansionLoc(L)); in GetFID() local
34 FIDMap::const_iterator I = FIDs.find(FID); in GetFID()
DSourceManagerInternals.h104 void AddLineNote(FileID FID, unsigned Offset,
106 void AddLineNote(FileID FID, unsigned Offset,
114 const LineEntry *FindNearestLineEntry(FileID FID, unsigned Offset);
123 void AddEntry(FileID FID, const std::vector<LineEntry> &Entries);
/external/clang/lib/Rewrite/
DRewriter.cpp215 FileID &FID) const { in getLocationOffsetAndFileID()
218 FID = V.first; in getLocationOffsetAndFileID()
225 RewriteBuffer &Rewriter::getEditBuffer(FileID FID) { in getEditBuffer() argument
227 RewriteBuffers.lower_bound(FID); in getEditBuffer()
228 if (I != RewriteBuffers.end() && I->first == FID) in getEditBuffer()
230 I = RewriteBuffers.insert(I, std::make_pair(FID, RewriteBuffer())); in getEditBuffer()
232 StringRef MB = SourceMgr->getBufferData(FID); in getEditBuffer()
243 FileID FID; in InsertText() local
244 unsigned StartOffs = getLocationOffsetAndFileID(Loc, FID); in InsertText()
248 StringRef MB = SourceMgr->getBufferData(FID); in InsertText()
[all …]
DHTMLRewrite.cpp37 FileID FID = SM.getFileID(B); in HighlightRange() local
38 assert(SM.getFileID(E) == FID && "B/E not in the same file!"); in HighlightRange()
47 const char *BufferStart = SM.getBufferData(FID, &Invalid).data(); in HighlightRange()
51 HighlightRange(R.getEditBuffer(FID), BOffset, EOffset, in HighlightRange()
106 void html::EscapeText(Rewriter &R, FileID FID, in EscapeText() argument
109 const llvm::MemoryBuffer *Buf = R.getSourceMgr().getBuffer(FID); in EscapeText()
115 RewriteBuffer &RB = R.getEditBuffer(FID); in EscapeText()
226 void html::AddLineNumbers(Rewriter& R, FileID FID) { in AddLineNumbers() argument
228 const llvm::MemoryBuffer *Buf = R.getSourceMgr().getBuffer(FID); in AddLineNumbers()
232 RewriteBuffer &RB = R.getEditBuffer(FID); in AddLineNumbers()
[all …]
DTokenRewriter.cpp21 TokenRewriter::TokenRewriter(FileID FID, SourceManager &SM, in TokenRewriter() argument
26 const llvm::MemoryBuffer *FromFile = SM.getBuffer(FID); in TokenRewriter()
27 Lexer RawLex(FID, FromFile, SM, LangOpts); in TokenRewriter()
/external/clang/lib/Frontend/Rewrite/
DHTMLPrint.cpp67 FileID FID = R.getSourceMgr().getMainFileID(); in HandleTranslationUnit() local
68 const FileEntry* Entry = R.getSourceMgr().getFileEntryForID(FID); in HandleTranslationUnit()
76 Name = R.getSourceMgr().getBuffer(FID)->getBufferIdentifier(); in HandleTranslationUnit()
78 html::AddLineNumbers(R, FID); in HandleTranslationUnit()
79 html::AddHeaderFooterInternalBuiltinCSS(R, FID, Name); in HandleTranslationUnit()
85 if (SyntaxHighlight) html::SyntaxHighlight(R, FID, PP); in HandleTranslationUnit()
86 if (HighlightMacros) html::HighlightMacros(R, FID, PP); in HandleTranslationUnit()
87 html::EscapeText(R, FID, false, true); in HandleTranslationUnit()
90 const RewriteBuffer &RewriteBuf = R.getEditBuffer(FID); in HandleTranslationUnit()
/external/clang/include/clang/Edit/
DFileOffset.h20 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;
44 return std::tie(LHS.FID, LHS.Offs) < std::tie(RHS.FID, RHS.Offs);
/external/clang/lib/Basic/
DSourceManager.cpp190 void LineTableInfo::AddLineNote(FileID FID, unsigned Offset, in AddLineNote() argument
192 std::vector<LineEntry> &Entries = LineEntries[FID]; in AddLineNote()
221 void LineTableInfo::AddLineNote(FileID FID, unsigned Offset, in AddLineNote() argument
227 std::vector<LineEntry> &Entries = LineEntries[FID]; in AddLineNote()
244 FindNearestLineEntry(FID, Entries.back().IncludeOffset)) in AddLineNote()
255 const LineEntry *LineTableInfo::FindNearestLineEntry(FileID FID, in FindNearestLineEntry() argument
257 const std::vector<LineEntry> &Entries = LineEntries[FID]; in FindNearestLineEntry()
274 void LineTableInfo::AddEntry(FileID FID, in AddEntry() argument
276 LineEntries[FID] = Entries; in AddEntry()
519 FileID SourceManager::getPreviousFileID(FileID FID) const { in getPreviousFileID()
[all …]
/external/clang/include/clang/Rewrite/Core/
DHTMLRewrite.h53 void EscapeText(Rewriter& R, FileID FID,
63 void AddLineNumbers(Rewriter& R, FileID FID);
65 void AddHeaderFooterInternalBuiltinCSS(Rewriter& R, FileID FID,
70 void SyntaxHighlight(Rewriter &R, FileID FID, const Preprocessor &PP);
76 void HighlightMacros(Rewriter &R, FileID FID, const Preprocessor &PP);
DRewriter.h166 RewriteBuffer &getEditBuffer(FileID FID);
170 const RewriteBuffer *getRewriteBufferFor(FileID FID) const { in getRewriteBufferFor() argument
172 RewriteBuffers.find(FID); in getRewriteBufferFor()
190 unsigned getLocationOffsetAndFileID(SourceLocation Loc, FileID &FID) const;
/external/clang/tools/libclang/
DCIndexHigh.cpp48 FileID FID; member
56 FindFileIdRefVisitData(CXTranslationUnit TU, FileID FID, in FindFileIdRefVisitData()
59 : TU(TU), FID(FID), SelectorIdIdx(selectorIdIdx), visitor(visitor) { in FindFileIdRefVisitData()
199 if (LocInfo.first != data->FID) in findFileIdRefVisit()
221 FileID FID = SM.translateFile(File); in findIdRefsInFile() local
226 FindFileIdRefVisitData data(TU, FID, Dcl, in findIdRefsInFile()
235 SourceRange Range(SM.getLocForStartOfFile(FID), SM.getLocForEndOfFile(FID)); in findIdRefsInFile()
319 FileID FID = SM.translateFile(File); in findMacroRefsInFile() local
330 SourceRange Range(SM.getLocForStartOfFile(FID), SM.getLocForEndOfFile(FID)); in findMacroRefsInFile()
391 FileID FID = SM.translateFile(File); in findIncludesInFile() local
[all …]
DCXSourceLocation.cpp338 FileID FID = LocInfo.first; in clang_getSpellingLocation() local
341 if (FID.isInvalid()) in clang_getSpellingLocation()
345 *file = const_cast<FileEntry *>(SM.getFileEntryForID(FID)); in clang_getSpellingLocation()
347 *line = SM.getLineNumber(FID, FileOffset); in clang_getSpellingLocation()
349 *column = SM.getColumnNumber(FID, FileOffset); in clang_getSpellingLocation()
375 FileID FID = LocInfo.first; in clang_getFileLocation() local
378 if (FID.isInvalid()) in clang_getFileLocation()
382 *file = const_cast<FileEntry *>(SM.getFileEntryForID(FID)); in clang_getFileLocation()
384 *line = SM.getLineNumber(FID, FileOffset); in clang_getFileLocation()
386 *column = SM.getColumnNumber(FID, FileOffset); in clang_getFileLocation()
DIndexing.cpp60 bool isParsed(SourceLocation Loc, FileID FID, const FileEntry *FE) { in isParsed() argument
187 bool isParsed(SourceLocation Loc, FileID FID, const FileEntry *FE) {
188 PPRegion region = getRegion(Loc, FID, FE);
208 PPRegion getRegion(SourceLocation Loc, FileID FID, const FileEntry *FE) {
224 if (RegionFID != FID) {
368 FileID FID; in shouldSkipFunctionBody() local
370 std::tie(FID, Offset) = SM.getDecomposedLoc(Loc); in shouldSkipFunctionBody()
372 if (SM.getMainFileID() == FID) in shouldSkipFunctionBody()
374 const FileEntry *FE = SM.getFileEntryForID(FID); in shouldSkipFunctionBody()
378 return SKCtrl->isParsed(Loc, FID, FE); in shouldSkipFunctionBody()
/external/clang/lib/Frontend/
DLogDiagnosticPrinter.cpp120 FileID FID = SM.getMainFileID(); in HandleDiagnostic() local
121 if (!FID.isInvalid()) { in HandleDiagnostic()
122 const FileEntry *FE = SM.getFileEntryForID(FID); in HandleDiagnostic()
149 FileID FID = SM.getFileID(Info.getLocation()); in HandleDiagnostic() local
150 if (!FID.isInvalid()) { in HandleDiagnostic()
151 const FileEntry *FE = SM.getFileEntryForID(FID); in HandleDiagnostic()
DVerifyDiagnosticConsumer.cpp129 FileID FID = SrcManager->getFileID(Loc); in HandleDiagnostic() local
131 const FileEntry *FE = SrcManager->getFileEntryForID(FID); in HandleDiagnostic()
132 if (FE && CurrentPreprocessor && SrcManager->isLoadedFileID(FID)) { in HandleDiagnostic()
140 UpdateParsedFileStatus(*SrcManager, FID, PS); in HandleDiagnostic()
581 static bool findDirectives(SourceManager &SM, FileID FID, in findDirectives() argument
584 if (FID.isInvalid()) in findDirectives()
588 const llvm::MemoryBuffer *FromFile = SM.getBuffer(FID); in findDirectives()
589 Lexer RawLex(FID, FromFile, SM, LangOpts); in findDirectives()
768 FileID FID, in UpdateParsedFileStatus() argument
774 if (FID.isInvalid()) in UpdateParsedFileStatus()
[all …]
DTextDiagnostic.cpp779 FileID FID = SM.getFileID(Loc); in emitDiagnosticLoc() local
780 if (!FID.isInvalid()) { in emitDiagnosticLoc()
781 const FileEntry* FE = SM.getFileEntryForID(FID); in emitDiagnosticLoc()
908 unsigned LineNo, FileID FID, in highlightRange() argument
919 if (StartLineNo > LineNo || SM.getFileID(Begin) != FID) in highlightRange()
923 if (EndLineNo < LineNo || SM.getFileID(End) != FID) in highlightRange()
1080 FileID FID = LocInfo.first; in emitSnippetAndCaret() local
1085 const char *BufStart = SM.getBufferData(FID, &Invalid).data(); in emitSnippetAndCaret()
1089 unsigned LineNo = SM.getLineNumber(FID, FileOffset); in emitSnippetAndCaret()
1090 unsigned ColNo = SM.getColumnNumber(FID, FileOffset); in emitSnippetAndCaret()
[all …]
DASTUnit.cpp2506 FileID FID = SrcMgr.translateFile(FE); in TranslateStoredDiagnostics() local
2507 SourceLocation FileLoc = SrcMgr.getLocForStartOfFile(FID); in TranslateStoredDiagnostics()
2556 FileID FID; in addFileLevelDecl() local
2558 std::tie(FID, Offset) = SM.getDecomposedLoc(FileLoc); in addFileLevelDecl()
2559 if (FID.isInvalid()) in addFileLevelDecl()
2562 LocDeclsTy *&Decls = FileDecls[FID]; in addFileLevelDecl()
2679 FileID FID; in isInPreambleFileID() local
2681 FID = SourceMgr->getPreambleFileID(); in isInPreambleFileID()
2683 if (Loc.isInvalid() || FID.isInvalid()) in isInPreambleFileID()
2686 return SourceMgr->isInFileID(Loc, FID); in isInPreambleFileID()
[all …]
/external/clang/lib/StaticAnalyzer/Core/
DHTMLDiagnostics.cpp126 FileID FID = in ReportDiag() local
128 assert(!FID.isInvalid()); in ReportDiag()
159 HandlePiece(R, FID, **I, n, max); in ReportDiag()
164 html::EscapeText(R, FID); in ReportDiag()
165 html::AddLineNumbers(R, FID); in ReportDiag()
171 html::SyntaxHighlight(R, FID, PP); in ReportDiag()
172 html::HighlightMacros(R, FID, PP); in ReportDiag()
176 const FileEntry* Entry = SMgr.getFileEntryForID(FID); in ReportDiag()
222 R.InsertTextBefore(SMgr.getLocForStartOfFile(FID), os.str()); in ReportDiag()
262 R.InsertTextBefore(SMgr.getLocForStartOfFile(FID), os.str()); in ReportDiag()
[all …]
/external/clang/lib/Lex/
DPPLexerChange.cpp71 bool Preprocessor::EnterSourceFile(FileID FID, const DirectoryLookup *CurDir, in EnterSourceFile() argument
80 if (PTHLexer *PL = PTH->CreateLexer(FID)) { in EnterSourceFile()
89 getSourceManager().getBuffer(FID, Loc, &Invalid); in EnterSourceFile()
91 SourceLocation FileStart = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile()
98 SourceMgr.getFileEntryForID(FID) == CodeCompletionFile) { in EnterSourceFile()
99 CodeCompletionFileLoc = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile()
104 EnterSourceFileWithLexer(new Lexer(FID, InputFile, *this), CurDir); in EnterSourceFile()
151 FileID FID = CurPPLexer->getFileID(); in EnterSourceFileWithPTH() local
152 SourceLocation EnterLoc = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFileWithPTH()
DPreprocessingRecord.cpp67 static bool isPreprocessedEntityIfInFileID(PreprocessedEntity *PPE, FileID FID, in isPreprocessedEntityIfInFileID() argument
69 assert(!FID.isInvalid()); in isPreprocessedEntityIfInFileID()
77 return SM.isInFileID(SM.getFileLoc(Loc), FID); in isPreprocessedEntityIfInFileID()
87 bool PreprocessingRecord::isEntityInFileID(iterator PPEI, FileID FID) { in isEntityInFileID() argument
88 if (FID.isInvalid()) in isEntityInFileID()
100 return isPreprocessedEntityIfInFileID(PPE, FID, SourceMgr); in isEntityInFileID()
105 ExternalSource->isPreprocessedEntityInFileID(LoadedIndex, FID); in isEntityInFileID()
113 FID, SourceMgr); in isEntityInFileID()
121 FID, SourceMgr); in isEntityInFileID()
DScratchBuffer.cpp72 FileID FID = SourceMgr.createFileID(std::move(OwnBuf)); in AllocScratchBuffer() local
73 BufferStartLoc = SourceMgr.getLocForStartOfFile(FID); in AllocScratchBuffer()
DPTHLexer.cpp37 PTHLexer::PTHLexer(Preprocessor &PP, FileID FID, const unsigned char *D, in PTHLexer() argument
39 : PreprocessorLexer(&PP, FID), TokBuf(D), CurPtr(D), LastHashTokPtr(nullptr), in PTHLexer()
42 FileStartLoc = PP.getSourceManager().getLocForStartOfFile(FID); in PTHLexer()
596 PTHLexer *PTHManager::CreateLexer(FileID FID) { in CreateLexer() argument
597 const FileEntry *FE = PP->getSourceManager().getFileEntryForID(FID); in CreateLexer()
623 return new PTHLexer(*PP, FID, data, ppcond, *this); in CreateLexer()
/external/clang/include/clang/Lex/
DPreprocessorLexer.h33 const FileID FID; variable
156 return FID; in getFileID()
/external/clang/lib/ARCMigrate/
DPlistReporter.cpp75 for (FileID FID : Fids) in writeARCDiagsToPlist() local
76 EmitString(o << " ", SM.getFileEntryForID(FID)->getName()) << '\n'; in writeARCDiagsToPlist()

1234