Lines Matching refs:SM
78 SourceManager &SM; member in __anon229160920111::CoverageMappingBuilder
92 CoverageMappingBuilder(CoverageMappingModuleGen &CVM, SourceManager &SM, in CoverageMappingBuilder() argument
94 : CVM(CVM), SM(SM), LangOpts(LangOpts) {} in CoverageMappingBuilder()
101 Lexer::MeasureTokenLength(SM.getSpellingLoc(Loc), SM, LangOpts); in getPreciseTokenLocEnd()
108 return Loc.getLocWithOffset(-SM.getFileOffset(Loc)); in getStartOfFileOrMacro()
109 return SM.getLocForStartOfFile(SM.getFileID(Loc)); in getStartOfFileOrMacro()
115 return Loc.getLocWithOffset(SM.getFileIDSize(SM.getFileID(Loc)) - in getEndOfFileOrMacro()
116 SM.getFileOffset(Loc)); in getEndOfFileOrMacro()
117 return SM.getLocForEndOfFile(SM.getFileID(Loc)); in getEndOfFileOrMacro()
122 return Loc.isMacroID() ? SM.getImmediateExpansionRange(Loc).first in getIncludeOrExpansionLoc()
123 : SM.getIncludeLoc(SM.getFileID(Loc)); in getIncludeOrExpansionLoc()
128 return strcmp(SM.getBufferName(SM.getSpellingLoc(Loc)), "<built-in>") == 0; in isInBuiltin()
134 while (SM.isMacroArgExpansion(Loc) || isInBuiltin(Loc)) in getStart()
135 Loc = SM.getImmediateExpansionRange(Loc).first; in getStart()
142 while (SM.isMacroArgExpansion(Loc) || isInBuiltin(Loc)) in getEnd()
143 Loc = SM.getImmediateExpansionRange(Loc).first; in getEnd()
159 FileID File = SM.getFileID(Loc); in gatherFileIDs()
174 FileID SpellingFile = SM.getDecomposedSpellingLoc(Loc).first; in gatherFileIDs()
175 auto Entry = SM.getFileEntryForID(SpellingFile); in gatherFileIDs()
179 FileIDMapping[SM.getFileID(Loc)] = std::make_pair(Mapping.size(), Loc); in gatherFileIDs()
188 auto Mapping = FileIDMapping.find(SM.getFileID(Loc)); in getCoverageFileID()
220 assert(SM.isWrittenInSameFile(LocStart, LocEnd) && in gatherSkippedRegions()
226 unsigned LineStart = SM.getSpellingLineNumber(LocStart); in gatherSkippedRegions()
227 unsigned ColumnStart = SM.getSpellingColumnNumber(LocStart); in gatherSkippedRegions()
228 unsigned LineEnd = SM.getSpellingLineNumber(LocEnd); in gatherSkippedRegions()
229 unsigned ColumnEnd = SM.getSpellingColumnNumber(LocEnd); in gatherSkippedRegions()
247 assert(SM.getFileID(LocStart).isValid() && "region in invalid file"); in emitSourceRegions()
255 assert(SM.isWrittenInSameFile(LocStart, LocEnd) && in emitSourceRegions()
259 unsigned LineStart = SM.getSpellingLineNumber(LocStart); in emitSourceRegions()
260 unsigned ColumnStart = SM.getSpellingColumnNumber(LocStart); in emitSourceRegions()
261 unsigned LineEnd = SM.getSpellingLineNumber(LocEnd); in emitSourceRegions()
262 unsigned ColumnEnd = SM.getSpellingColumnNumber(LocEnd); in emitSourceRegions()
286 assert(SM.isWrittenInSameFile(ParentLoc, LocEnd) && in emitExpansionRegions()
289 unsigned LineStart = SM.getSpellingLineNumber(ParentLoc); in emitExpansionRegions()
290 unsigned ColumnStart = SM.getSpellingColumnNumber(ParentLoc); in emitExpansionRegions()
291 unsigned LineEnd = SM.getSpellingLineNumber(LocEnd); in emitExpansionRegions()
292 unsigned ColumnEnd = SM.getSpellingColumnNumber(LocEnd); in emitExpansionRegions()
304 EmptyCoverageMappingBuilder(CoverageMappingModuleGen &CVM, SourceManager &SM, in EmptyCoverageMappingBuilder()
306 : CoverageMappingBuilder(CVM, SM, LangOpts) {} in EmptyCoverageMappingBuilder()
396 while (!SM.isWrittenInSameFile(StartLoc, EndLoc)) { in popRegions()
400 assert(SM.isWrittenInSameFile(NestedLoc, EndLoc)); in popRegions()
417 assert(SM.isWrittenInSameFile(Region.getStartLoc(), EndLoc)); in popRegions()
457 } while (!SM.isInFileID(Loc, Parent)); in isNestedIn()
468 SM.isWrittenInSameFile(MostRecentLocation, NewLoc)) in handleFileExit()
474 FileID ParentFile = SM.getFileID(LCA); in handleFileExit()
477 if (LCA.isInvalid() || SM.isWrittenInSameFile(LCA, MostRecentLocation)) { in handleFileExit()
483 ParentFile = SM.getFileID(LCA); in handleFileExit()
497 while (!SM.isInFileID(Loc, ParentFile)) { in handleFileExit()
554 llvm::DenseMap<const Stmt *, unsigned> &CounterMap, SourceManager &SM, in CounterCoverageMappingBuilder()
556 : CoverageMappingBuilder(CVM, SM, LangOpts), CounterMap(CounterMap) {} in CounterCoverageMappingBuilder()
1034 CounterCoverageMappingBuilder Walker(CVM, *CounterMap, SM, LangOpts); in emitCounterMapping()
1041 EmptyCoverageMappingBuilder Walker(CVM, SM, LangOpts); in emitEmptyMapping()