• Home
  • Raw
  • Download

Lines Matching refs:SM

80   SourceManager &SM;  member in __anon1aa876fb0111::CoverageMappingBuilder
94 CoverageMappingBuilder(CoverageMappingModuleGen &CVM, SourceManager &SM, in CoverageMappingBuilder() argument
96 : CVM(CVM), SM(SM), LangOpts(LangOpts) {} in CoverageMappingBuilder()
103 Lexer::MeasureTokenLength(SM.getSpellingLoc(Loc), SM, LangOpts); in getPreciseTokenLocEnd()
110 return Loc.getLocWithOffset(-SM.getFileOffset(Loc)); in getStartOfFileOrMacro()
111 return SM.getLocForStartOfFile(SM.getFileID(Loc)); in getStartOfFileOrMacro()
117 return Loc.getLocWithOffset(SM.getFileIDSize(SM.getFileID(Loc)) - in getEndOfFileOrMacro()
118 SM.getFileOffset(Loc)); in getEndOfFileOrMacro()
119 return SM.getLocForEndOfFile(SM.getFileID(Loc)); in getEndOfFileOrMacro()
124 return Loc.isMacroID() ? SM.getImmediateExpansionRange(Loc).first in getIncludeOrExpansionLoc()
125 : SM.getIncludeLoc(SM.getFileID(Loc)); in getIncludeOrExpansionLoc()
130 return strcmp(SM.getBufferName(SM.getSpellingLoc(Loc)), "<built-in>") == 0; in isInBuiltin()
139 } while (!SM.isInFileID(Loc, Parent)); in isNestedIn()
146 while (SM.isMacroArgExpansion(Loc) || isInBuiltin(Loc)) in getStart()
147 Loc = SM.getImmediateExpansionRange(Loc).first; in getStart()
154 while (SM.isMacroArgExpansion(Loc) || isInBuiltin(Loc)) in getEnd()
155 Loc = SM.getImmediateExpansionRange(Loc).first; in getEnd()
171 FileID File = SM.getFileID(Loc); in gatherFileIDs()
176 if (SM.isInSystemHeader(SM.getSpellingLoc(Loc))) in gatherFileIDs()
189 FileID SpellingFile = SM.getDecomposedSpellingLoc(Loc).first; in gatherFileIDs()
190 auto Entry = SM.getFileEntryForID(SpellingFile); in gatherFileIDs()
194 FileIDMapping[SM.getFileID(Loc)] = std::make_pair(Mapping.size(), Loc); in gatherFileIDs()
203 auto Mapping = FileIDMapping.find(SM.getFileID(Loc)); in getCoverageFileID()
229 assert(SM.isWrittenInSameFile(LocStart, LocEnd) && in gatherSkippedRegions()
235 unsigned LineStart = SM.getSpellingLineNumber(LocStart); in gatherSkippedRegions()
236 unsigned ColumnStart = SM.getSpellingColumnNumber(LocStart); in gatherSkippedRegions()
237 unsigned LineEnd = SM.getSpellingLineNumber(LocEnd); in gatherSkippedRegions()
238 unsigned ColumnEnd = SM.getSpellingColumnNumber(LocEnd); in gatherSkippedRegions()
256 assert(SM.getFileID(LocStart).isValid() && "region in invalid file"); in emitSourceRegions()
259 if (SM.isInSystemHeader(SM.getSpellingLoc(LocStart))) in emitSourceRegions()
268 assert(SM.isWrittenInSameFile(LocStart, LocEnd) && in emitSourceRegions()
272 unsigned LineStart = SM.getSpellingLineNumber(LocStart); in emitSourceRegions()
273 unsigned ColumnStart = SM.getSpellingColumnNumber(LocStart); in emitSourceRegions()
274 unsigned LineEnd = SM.getSpellingLineNumber(LocEnd); in emitSourceRegions()
275 unsigned ColumnEnd = SM.getSpellingColumnNumber(LocEnd); in emitSourceRegions()
299 assert(SM.isWrittenInSameFile(ParentLoc, LocEnd) && in emitExpansionRegions()
302 unsigned LineStart = SM.getSpellingLineNumber(ParentLoc); in emitExpansionRegions()
303 unsigned ColumnStart = SM.getSpellingColumnNumber(ParentLoc); in emitExpansionRegions()
304 unsigned LineEnd = SM.getSpellingLineNumber(LocEnd); in emitExpansionRegions()
305 unsigned ColumnEnd = SM.getSpellingColumnNumber(LocEnd); in emitExpansionRegions()
317 EmptyCoverageMappingBuilder(CoverageMappingModuleGen &CVM, SourceManager &SM, in EmptyCoverageMappingBuilder()
319 : CoverageMappingBuilder(CVM, SM, LangOpts) {} in EmptyCoverageMappingBuilder()
327 if (!SM.isWrittenInSameFile(Start, End)) { in VisitDecl()
330 FileID StartFileID = SM.getFileID(Start); in VisitDecl()
331 FileID EndFileID = SM.getFileID(End); in VisitDecl()
336 StartFileID = SM.getFileID(Start); in VisitDecl()
342 EndFileID = SM.getFileID(End); in VisitDecl()
425 while (!SM.isWrittenInSameFile(StartLoc, EndLoc)) { in popRegions()
429 assert(SM.isWrittenInSameFile(NestedLoc, EndLoc)); in popRegions()
446 assert(SM.isWrittenInSameFile(Region.getStartLoc(), EndLoc)); in popRegions()
468 if (SM.isBeforeInTranslationUnit(getStart(S), S->getLocStart())) in propagateCounts()
509 SM.isWrittenInSameFile(MostRecentLocation, NewLoc)) in handleFileExit()
515 FileID ParentFile = SM.getFileID(LCA); in handleFileExit()
518 if (LCA.isInvalid() || SM.isWrittenInSameFile(LCA, MostRecentLocation)) { in handleFileExit()
524 ParentFile = SM.getFileID(LCA); in handleFileExit()
538 while (!SM.isInFileID(Loc, ParentFile)) { in handleFileExit()
595 llvm::DenseMap<const Stmt *, unsigned> &CounterMap, SourceManager &SM, in CounterCoverageMappingBuilder()
597 : CoverageMappingBuilder(CVM, SM, LangOpts), CounterMap(CounterMap) {} in CounterCoverageMappingBuilder()
1104 CounterCoverageMappingBuilder Walker(CVM, *CounterMap, SM, LangOpts); in emitCounterMapping()
1111 EmptyCoverageMappingBuilder Walker(CVM, SM, LangOpts); in emitEmptyMapping()