Home
last modified time | relevance | path

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

12

/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 if (LHS.FID != RHS.FID)
45 return LHS.FID < RHS.FID;
49 if (LHS.FID != RHS.FID)
50 return LHS.FID > RHS.FID;
/external/clang/lib/Rewrite/
DRewriter.cpp208 FileID &FID) const { in getLocationOffsetAndFileID()
211 FID = V.first; in getLocationOffsetAndFileID()
218 RewriteBuffer &Rewriter::getEditBuffer(FileID FID) { in getEditBuffer() argument
220 RewriteBuffers.lower_bound(FID); in getEditBuffer()
221 if (I != RewriteBuffers.end() && I->first == FID) in getEditBuffer()
223 I = RewriteBuffers.insert(I, std::make_pair(FID, RewriteBuffer())); in getEditBuffer()
225 StringRef MB = SourceMgr->getBufferData(FID); in getEditBuffer()
236 FileID FID; in InsertText() local
237 unsigned StartOffs = getLocationOffsetAndFileID(Loc, FID); in InsertText()
241 StringRef MB = SourceMgr->getBufferData(FID); in InsertText()
[all …]
DHTMLPrint.cpp66 FileID FID = R.getSourceMgr().getMainFileID(); in HandleTranslationUnit() local
67 const FileEntry* Entry = R.getSourceMgr().getFileEntryForID(FID); in HandleTranslationUnit()
75 Name = R.getSourceMgr().getBuffer(FID)->getBufferIdentifier(); in HandleTranslationUnit()
77 html::AddLineNumbers(R, FID); in HandleTranslationUnit()
78 html::AddHeaderFooterInternalBuiltinCSS(R, FID, Name); in HandleTranslationUnit()
84 if (SyntaxHighlight) html::SyntaxHighlight(R, FID, PP); in HandleTranslationUnit()
85 if (HighlightMacros) html::HighlightMacros(R, FID, PP); in HandleTranslationUnit()
86 html::EscapeText(R, FID, false, true); in HandleTranslationUnit()
89 const RewriteBuffer &RewriteBuf = R.getEditBuffer(FID); in HandleTranslationUnit()
DHTMLRewrite.cpp38 FileID FID = SM.getFileID(B); in HighlightRange() local
39 assert(SM.getFileID(E) == FID && "B/E not in the same file!"); in HighlightRange()
48 const char *BufferStart = SM.getBufferData(FID, &Invalid).data(); in HighlightRange()
52 HighlightRange(R.getEditBuffer(FID), BOffset, EOffset, in HighlightRange()
107 void html::EscapeText(Rewriter &R, FileID FID, in EscapeText() argument
110 const llvm::MemoryBuffer *Buf = R.getSourceMgr().getBuffer(FID); in EscapeText()
116 RewriteBuffer &RB = R.getEditBuffer(FID); in EscapeText()
228 void html::AddLineNumbers(Rewriter& R, FileID FID) { in AddLineNumbers() argument
230 const llvm::MemoryBuffer *Buf = R.getSourceMgr().getBuffer(FID); in AddLineNumbers()
234 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/include/clang/Basic/
DSourceManager.h631 void setMainFileID(FileID FID) { in setMainFileID() argument
633 MainFileID = FID; in setMainFileID()
725 const llvm::MemoryBuffer *getBuffer(FileID FID, SourceLocation Loc,
728 const SrcMgr::SLocEntry &Entry = getSLocEntry(FID, &MyInvalid);
740 const llvm::MemoryBuffer *getBuffer(FileID FID, bool *Invalid = 0) const {
742 const SrcMgr::SLocEntry &Entry = getSLocEntry(FID, &MyInvalid);
756 const FileEntry *getFileEntryForID(FileID FID) const { in getFileEntryForID() argument
758 const SrcMgr::SLocEntry &Entry = getSLocEntry(FID, &MyInvalid); in getFileEntryForID()
782 StringRef getBufferData(FileID FID, bool *Invalid = 0) const;
786 unsigned getNumCreatedFIDsForFileID(FileID FID) const { in getNumCreatedFIDsForFileID() argument
[all …]
DSourceManagerInternals.h107 void AddLineNote(int FID, unsigned Offset,
109 void AddLineNote(int FID, unsigned Offset,
116 const LineEntry *FindNearestLineEntry(int FID, unsigned Offset);
125 void AddEntry(int FID, const std::vector<LineEntry> &Entries);
/external/clang/include/clang/Rewrite/
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.h268 RewriteBuffer &getEditBuffer(FileID FID);
272 const RewriteBuffer *getRewriteBufferFor(FileID FID) const { in getRewriteBufferFor() argument
274 RewriteBuffers.find(FID); in getRewriteBufferFor()
283 unsigned getLocationOffsetAndFileID(SourceLocation Loc, FileID &FID) const;
/external/clang/lib/Basic/
DSourceManager.cpp194 void LineTableInfo::AddLineNote(int FID, unsigned Offset, in AddLineNote() argument
196 std::vector<LineEntry> &Entries = LineEntries[FID]; in AddLineNote()
225 void LineTableInfo::AddLineNote(int FID, unsigned Offset, in AddLineNote() argument
231 std::vector<LineEntry> &Entries = LineEntries[FID]; in AddLineNote()
248 FindNearestLineEntry(FID, Entries.back().IncludeOffset)) in AddLineNote()
259 const LineEntry *LineTableInfo::FindNearestLineEntry(int FID, in FindNearestLineEntry() argument
261 const std::vector<LineEntry> &Entries = LineEntries[FID]; in FindNearestLineEntry()
278 void LineTableInfo::AddEntry(int FID, in AddEntry() argument
280 LineEntries[FID] = Entries; in AddEntry()
561 FileID FID = FileID::get(LocalSLocEntryTable.size()-1); in createFileID() local
[all …]
/external/clang/tools/libclang/
DCIndexHigh.cpp46 FileID FID; member
54 FindFileIdRefVisitData(CXTranslationUnit TU, FileID FID, in FindFileIdRefVisitData()
57 : TU(TU), FID(FID), SelectorIdIdx(selectorIdIdx), visitor(visitor) { in FindFileIdRefVisitData()
196 if (LocInfo.first != data->FID) in findFileIdRefVisit()
218 FileID FID = SM.translateFile(File); in findIdRefsInFile() local
223 FindFileIdRefVisitData data(TU, FID, Dcl, in findIdRefsInFile()
233 SourceRange Range(SM.getLocForStartOfFile(FID), SM.getLocForEndOfFile(FID)); in findIdRefsInFile()
316 FileID FID = SM.translateFile(File); in findMacroRefsInFile() local
327 SourceRange Range(SM.getLocForStartOfFile(FID), SM.getLocForEndOfFile(FID)); in findMacroRefsInFile()
DCXSourceLocation.cpp309 FileID FID = LocInfo.first; in clang_getSpellingLocation() local
312 if (FID.isInvalid()) in clang_getSpellingLocation()
316 *file = (void *)SM.getFileEntryForID(FID); in clang_getSpellingLocation()
318 *line = SM.getLineNumber(FID, FileOffset); in clang_getSpellingLocation()
320 *column = SM.getColumnNumber(FID, FileOffset); in clang_getSpellingLocation()
/external/clang/lib/Frontend/
DLogDiagnosticPrinter.cpp129 FileID FID = SM.getMainFileID(); in HandleDiagnostic() local
130 if (!FID.isInvalid()) { in HandleDiagnostic()
131 const FileEntry *FE = SM.getFileEntryForID(FID); in HandleDiagnostic()
156 FileID FID = SM.getFileID(Info.getLocation()); in HandleDiagnostic() local
157 if (!FID.isInvalid()) { in HandleDiagnostic()
158 const FileEntry *FE = SM.getFileEntryForID(FID); in HandleDiagnostic()
DTextDiagnostic.cpp699 FileID FID = SM.getFileID(Loc); in emitDiagnosticLoc() local
700 if (!FID.isInvalid()) { in emitDiagnosticLoc()
701 const FileEntry* FE = SM.getFileEntryForID(FID); in emitDiagnosticLoc()
838 FileID FID = LocInfo.first; in emitSnippetAndCaret() local
843 StringRef BufData = SM.getBufferData(FID, &Invalid); in emitSnippetAndCaret()
850 unsigned LineNo = SM.getLineNumber(FID, FileOffset); in emitSnippetAndCaret()
851 unsigned ColNo = SM.getColumnNumber(FID, FileOffset); in emitSnippetAndCaret()
884 highlightRange(*I, LineNo, FID, sourceColMap, CaretLine); in emitSnippetAndCaret()
980 unsigned LineNo, FileID FID, in highlightRange() argument
997 if (StartLineNo > LineNo || SM.getFileID(Begin) != FID) in highlightRange()
[all …]
DASTUnit.cpp2570 FileID FID; in addFileLevelDecl() local
2572 llvm::tie(FID, Offset) = SM.getDecomposedLoc(FileLoc); in addFileLevelDecl()
2573 if (FID.isInvalid()) in addFileLevelDecl()
2576 LocDeclsTy *&Decls = FileDecls[FID]; in addFileLevelDecl()
2693 FileID FID; in isInPreambleFileID() local
2695 FID = SourceMgr->getPreambleFileID(); in isInPreambleFileID()
2697 if (Loc.isInvalid() || FID.isInvalid()) in isInPreambleFileID()
2700 return SourceMgr->isInFileID(Loc, FID); in isInPreambleFileID()
2704 FileID FID; in isInMainFileID() local
2706 FID = SourceMgr->getMainFileID(); in isInMainFileID()
[all …]
/external/clang/lib/Lex/
DPPLexerChange.cpp71 void 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()
149 FileID FID = CurPPLexer->getFileID(); in EnterSourceFileWithPTH() local
150 SourceLocation EnterLoc = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFileWithPTH()
DPreprocessingRecord.cpp71 static bool isPreprocessedEntityIfInFileID(PreprocessedEntity *PPE, FileID FID, in isPreprocessedEntityIfInFileID() argument
73 assert(!FID.isInvalid()); in isPreprocessedEntityIfInFileID()
81 if (SM.isInFileID(SM.getFileLoc(Loc), FID)) in isPreprocessedEntityIfInFileID()
94 bool PreprocessingRecord::isEntityInFileID(iterator PPEI, FileID FID) { in isEntityInFileID() argument
95 if (FID.isInvalid()) in isEntityInFileID()
105 return isPreprocessedEntityIfInFileID(PPE, FID, SourceMgr); in isEntityInFileID()
110 IsInFile = ExternalSource->isPreprocessedEntityInFileID(LoadedIndex, FID); in isEntityInFileID()
118 FID, SourceMgr); in isEntityInFileID()
124 FID, SourceMgr); in isEntityInFileID()
DScratchBuffer.cpp68 FileID FID = SourceMgr.createFileIDForMemBuffer(Buf); in AllocScratchBuffer() local
69 BufferStartLoc = SourceMgr.getLocForStartOfFile(FID); in AllocScratchBuffer()
DPTHLexer.cpp39 PTHLexer::PTHLexer(Preprocessor &PP, FileID FID, const unsigned char *D, in PTHLexer() argument
41 : PreprocessorLexer(&PP, FID), TokBuf(D), CurPtr(D), LastHashTokPtr(0), in PTHLexer()
44 FileStartLoc = PP.getSourceManager().getLocForStartOfFile(FID); in PTHLexer()
590 PTHLexer *PTHManager::CreateLexer(FileID FID) { in CreateLexer() argument
591 const FileEntry *FE = PP->getSourceManager().getFileEntryForID(FID); in CreateLexer()
616 return new PTHLexer(*PP, FID, data, ppcond, *this); in CreateLexer()
DLexer.cpp117 Lexer::Lexer(FileID FID, const llvm::MemoryBuffer *InputFile, Preprocessor &PP) in Lexer() argument
118 : PreprocessorLexer(&PP, FID), in Lexer()
119 FileLoc(PP.getSourceManager().getLocForStartOfFile(FID)), in Lexer()
145 Lexer::Lexer(FileID FID, const llvm::MemoryBuffer *FromFile, in Lexer() argument
147 : FileLoc(SM.getLocForStartOfFile(FID)), LangOpts(langOpts) { in Lexer()
776 FileID FID = SM.getFileID(loc); in isAtEndOfMacroExpansion() local
778 if (SM.isInFileID(afterLoc, FID)) in isAtEndOfMacroExpansion()
785 SM.getSLocEntry(FID).getExpansion().getExpansionLocEnd(); in isAtEndOfMacroExpansion()
809 FileID FID; in makeRangeFromFileLocs() local
811 llvm::tie(FID, BeginOffs) = SM.getDecomposedLoc(Begin); in makeRangeFromFileLocs()
[all …]
/external/clang/lib/ARCMigrate/
DPlistReporter.cpp25 FileID FID = SM.getFileID(SM.getExpansionLoc(L)); in AddFID() local
26 FIDMap::iterator I = FIDs.find(FID); in AddFID()
28 FIDs[FID] = V.size(); in AddFID()
29 V.push_back(FID); in AddFID()
34 FileID FID = SM.getFileID(SM.getExpansionLoc(L)); in GetFID() local
35 FIDMap::const_iterator I = FIDs.find(FID); in GetFID()
/external/clang/lib/StaticAnalyzer/Core/
DHTMLDiagnostics.cpp162 FileID FID = in ReportDiag() local
164 assert(!FID.isInvalid()); in ReportDiag()
176 HandlePiece(R, FID, **I, n, max); in ReportDiag()
181 html::EscapeText(R, FID); in ReportDiag()
182 html::AddLineNumbers(R, FID); in ReportDiag()
188 html::SyntaxHighlight(R, FID, PP); in ReportDiag()
189 html::HighlightMacros(R, FID, PP); in ReportDiag()
193 const FileEntry* Entry = SMgr.getFileEntryForID(FID); in ReportDiag()
236 R.InsertTextBefore(SMgr.getLocForStartOfFile(FID), os.str()); in ReportDiag()
268 R.InsertTextBefore(SMgr.getLocForStartOfFile(FID), os.str()); in ReportDiag()
[all …]
DPlistDiagnostics.cpp90 FileID FID = SM->getFileID(SM->getExpansionLoc(L)); in AddFID() local
91 FIDMap::iterator I = FIDs.find(FID); in AddFID()
93 FIDs[FID] = V.size(); in AddFID()
94 V.push_back(FID); in AddFID()
99 FileID FID = SM.getFileID(SM.getExpansionLoc(L)); in GetFID() local
100 FIDMap::const_iterator I = FIDs.find(FID); in GetFID()
DPathDiagnostic.cpp97 FileID FID; in HandlePathDiagnostic() local
111 if (FID.isInvalid()) { in HandlePathDiagnostic()
112 FID = SMgr.getFileID(L); in HandlePathDiagnostic()
113 } else if (SMgr.getFileID(L) != FID) in HandlePathDiagnostic()
121 if (!L.isFileID() || SMgr.getFileID(L) != FID) in HandlePathDiagnostic()
124 if (!L.isFileID() || SMgr.getFileID(L) != FID) in HandlePathDiagnostic()
139 if (FID.isInvalid()) in HandlePathDiagnostic()
/external/clang/include/clang/Lex/
DPreprocessorLexer.h32 const FileID FID; variable
153 return FID; in getFileID()

12