| /openbsd/src/gnu/llvm/clang/lib/Tooling/Transformer/ |
| D | SourceCode.cpp | 54 const SourceManager &SM, in validateRange() argument 65 if (SM.isInSystemHeader(Range.getBegin()) || in validateRange() 66 SM.isInSystemHeader(Range.getEnd())) in validateRange() 71 std::pair<FileID, unsigned> BeginInfo = SM.getDecomposedLoc(Range.getBegin()); in validateRange() 72 std::pair<FileID, unsigned> EndInfo = SM.getDecomposedLoc(Range.getEnd()); in validateRange() 85 const SourceManager &SM) { in validateEditRange() argument 86 return validateRange(Range, SM, /*AllowSystemHeaders=*/false); in validateEditRange() 90 const SourceManager &SM) { in spelledInMacroDefinition() argument 92 const auto &Expansion = SM.getSLocEntry(SM.getFileID(Loc)).getExpansion(); in spelledInMacroDefinition() 105 const SourceManager &SM, in getRange() argument [all …]
|
| /openbsd/src/gnu/llvm/clang/lib/Frontend/ |
| D | DiagnosticRenderer.cpp | 59 const SourceManager &SM, const LangOptions &LangOpts, in mergeFixits() argument 61 edit::Commit commit(SM, LangOpts); in mergeFixits() 79 edit::EditedSource Editor(SM, LangOpts); in mergeFixits() 248 void DiagnosticRenderer::emitModuleBuildStack(const SourceManager &SM) { in emitModuleBuildStack() argument 249 ModuleBuildStack Stack = SM.getModuleBuildStack(); in emitModuleBuildStack() 263 bool IsBegin, const SourceManager *SM, in retrieveMacroLocation() argument 265 assert(SM->getFileID(Loc) == MacroFileID); in retrieveMacroLocation() 273 if (SM->isMacroArgExpansion(Loc)) { in retrieveMacroLocation() 279 CharSourceRange(SM->getImmediateSpellingLoc(Loc), IsTokenRange); in retrieveMacroLocation() 280 MacroArgRange = SM->getImmediateExpansionRange(Loc); in retrieveMacroLocation() [all …]
|
| D | SARIFDiagnostic.cpp | 88 auto &SM = Loc.getManager(); in addLocationToResult() local 89 SourceLocation B = SM.getExpansionLoc(Range.getBegin()); in addLocationToResult() 90 CharSourceRange ERange = SM.getExpansionRange(Range.getEnd()); in addLocationToResult() 94 std::pair<FileID, unsigned> BInfo = SM.getDecomposedLoc(B); in addLocationToResult() 95 std::pair<FileID, unsigned> EInfo = SM.getDecomposedLoc(E); in addLocationToResult() 106 TokSize = Lexer::MeasureTokenLength(E, SM, LangOpts); in addLocationToResult() 108 FullSourceLoc BF(B, SM), EF(E, SM); in addLocationToResult() 109 SourceLocation BeginLoc = SM.translateLineCol( in addLocationToResult() 111 SourceLocation EndLoc = SM.translateLineCol( in addLocationToResult() 120 auto &SM = Loc.getManager(); in addLocationToResult() local [all …]
|
| /openbsd/src/gnu/llvm/clang/lib/Basic/ |
| D | SourceLocation.cpp | 35 Loc.print(OS, SM); in print() 62 void SourceLocation::print(raw_ostream &OS, const SourceManager &SM)const{ in print() 69 PresumedLoc PLoc = SM.getPresumedLoc(*this); in print() 81 SM.getExpansionLoc(*this).print(OS, SM); in print() 84 SM.getSpellingLoc(*this).print(OS, SM); in print() 89 SourceLocation::printToString(const SourceManager &SM) const { in printToString() 92 print(OS, SM); in printToString() 96 LLVM_DUMP_METHOD void SourceLocation::dump(const SourceManager &SM) const { in dump() 97 print(llvm::errs(), SM); in dump() 101 LLVM_DUMP_METHOD void SourceRange::dump(const SourceManager &SM) const { in dump() [all …]
|
| D | Cuda.cpp | 78 #define SM(sm) SM2(sm, "compute_" #sm) macro 85 SM(30), SM(32), SM(35), SM(37), // Kepler 86 SM(50), SM(52), SM(53), // Maxwell 87 SM(60), SM(61), SM(62), // Pascal 88 SM(70), SM(72), // Volta 89 SM(75), // Turing 90 SM(80), SM(86), // Ampere 91 SM(87), // Jetson/Drive AGX Orin 92 SM(89), // Ada Lovelace 93 SM(90), // Hopper [all …]
|
| D | XRayLists.cpp | 23 ArrayRef<std::string> AttrListPaths, SourceManager &SM) in XRayFunctionFilter() argument 25 AlwaysInstrumentPaths, SM.getFileManager().getVirtualFileSystem())), in XRayFunctionFilter() 27 NeverInstrumentPaths, SM.getFileManager().getVirtualFileSystem())), in XRayFunctionFilter() 29 AttrListPaths, SM.getFileManager().getVirtualFileSystem())), in XRayFunctionFilter() 30 SM(SM) {} in XRayFunctionFilter() 75 return this->shouldImbueFunctionsInFile(SM.getFilename(SM.getFileLoc(Loc)), in shouldImbueLocation()
|
| /openbsd/src/gnu/llvm/clang/lib/Analysis/ |
| D | MacroExpansionContext.cpp | 22 SourceManager &SM; member in clang::detail::MacroExpansionRangeRecorder 27 const Preprocessor &PP, SourceManager &SM, in MacroExpansionRangeRecorder() argument 29 : PP(PP), SM(SM), ExpansionRanges(ExpansionRanges) {} in MacroExpansionRangeRecorder() 37 SourceLocation MacroNameBegin = SM.getExpansionLoc(MacroName.getLocation()); in MacroExpands() 38 assert(MacroNameBegin == SM.getExpansionLoc(Range.getBegin())); in MacroExpands() 40 const SourceLocation ExpansionEnd = [Range, &SM = SM, &MacroName] { in MacroExpands() 43 return SM.getExpansionLoc( in MacroExpands() 47 return SM.getExpansionLoc(Range.getEnd()).getLocWithOffset(1); in MacroExpands() 55 MacroNameBegin.print(llvm::dbgs(), SM); in MacroExpands() 57 ExpansionEnd.print(llvm::dbgs(), SM); llvm::dbgs() << '\n';); in MacroExpands() [all …]
|
| D | CFGStmtMap.cpp | 28 SMap *SM = AsMap(M); in getBlock() local 34 SMap::iterator I = SM->find(X); in getBlock() 35 if (I != SM->end()) { in getBlock() 39 (*SM)[X] = B; in getBlock() 49 static void Accumulate(SMap &SM, CFGBlock *B) { in Accumulate() argument 57 CFGBlock *&Entry = SM[CS->getStmt()]; in Accumulate() 69 SM[Label] = B; in Accumulate() 75 SM[Term] = B; in Accumulate() 82 SMap *SM = new SMap(); in Build() local 87 Accumulate(*SM, *I); in Build() [all …]
|
| /openbsd/src/gnu/llvm/clang/lib/Frontend/Rewrite/ |
| D | RewriteMacros.cpp | 63 SourceManager &SM = PP.getSourceManager(); in LexRawTokensFromMainFile() local 67 llvm::MemoryBufferRef FromFile = SM.getBufferOrFake(SM.getMainFileID()); in LexRawTokensFromMainFile() 68 Lexer RawLex(SM.getMainFileID(), FromFile, SM, PP.getLangOpts()); in LexRawTokensFromMainFile() 90 SourceManager &SM = PP.getSourceManager(); in RewriteMacrosInInput() local 93 Rewrite.setSourceMgr(SM, PP.getLangOpts()); in RewriteMacrosInInput() 94 RewriteBuffer &RB = Rewrite.getEditBuffer(SM.getMainFileID()); in RewriteMacrosInInput() 114 SourceLocation PPLoc = SM.getExpansionLoc(PPTok.getLocation()); in RewriteMacrosInInput() 117 if (!SM.isWrittenInMainFile(PPLoc)) { in RewriteMacrosInInput() 133 RB.InsertTextAfter(SM.getFileOffset(RawTok.getLocation()), "//"); in RewriteMacrosInInput() 139 RB.InsertTextAfter(SM.getFileOffset(RawTok.getLocation()), "//"); in RewriteMacrosInInput() [all …]
|
| /openbsd/src/gnu/llvm/clang/tools/libclang/ |
| D | CXSourceLocation.cpp | 206 const SourceManager &SM = in clang_Location_isInSystemHeader() local 208 return SM.isInSystemHeader(Loc); in clang_Location_isInSystemHeader() 217 const SourceManager &SM = in clang_Location_isFromMainFile() local 219 return SM.isWrittenInMainFile(Loc); in clang_Location_isFromMainFile() 239 const SourceManager &SM = in clang_getExpansionLocation() local 241 SourceLocation ExpansionLoc = SM.getExpansionLoc(Loc); in clang_getExpansionLocation() 245 FileID fileID = SM.getFileID(ExpansionLoc); in clang_getExpansionLocation() 247 const SrcMgr::SLocEntry &sloc = SM.getSLocEntry(fileID, &Invalid); in clang_getExpansionLocation() 254 *file = const_cast<FileEntry *>(SM.getFileEntryForSLocEntry(sloc)); in clang_getExpansionLocation() 256 *line = SM.getExpansionLineNumber(ExpansionLoc); in clang_getExpansionLocation() [all …]
|
| D | CIndexHigh.cpp | 132 static SourceLocation getFileSpellingLoc(SourceManager &SM, in getFileSpellingLoc() argument 136 SourceLocation SpellLoc = SM.getImmediateSpellingLoc(Loc); in getFileSpellingLoc() 138 return getFileSpellingLoc(SM, SpellLoc, isMacroArg); in getFileSpellingLoc() 140 isMacroArg = SM.isMacroArgExpansion(Loc); in getFileSpellingLoc() 186 SourceManager &SM = Ctx.getSourceManager(); in findFileIdRefVisit() local 190 Loc = getFileSpellingLoc(SM, Loc, isMacroArg); in findFileIdRefVisit() 195 std::pair<FileID, unsigned> LocInfo = SM.getDecomposedLoc(Loc); in findFileIdRefVisit() 216 SourceManager &SM = cxtu::getASTUnit(TU)->getSourceManager(); in findIdRefsInFile() local 218 FileID FID = SM.translateFile(File); in findIdRefsInFile() 232 SourceRange Range(SM.getLocForStartOfFile(FID), SM.getLocForEndOfFile(FID)); in findIdRefsInFile() [all …]
|
| D | CIndexInclusionStack.cpp | 25 SourceManager &SM = CXXUnit->getSourceManager(); in getInclusions() local 28 const bool HasPreamble = SM.getPreambleFileID().isValid(); in getInclusions() 33 IsLocal ? SM.getLocalSLocEntry(i) : SM.getLoadedSLocEntry(i, &Invalid); in getInclusions() 50 PresumedLoc PLoc = SM.getPresumedLoc(L); in getInclusions() 76 SourceManager &SM = cxtu::getASTUnit(TU)->getSourceManager(); in clang_getInclusions() local 77 const unsigned n = SM.local_sloc_entry_size(); in clang_getInclusions() 84 if (n == 1 || SM.getPreambleFileID().isValid()) { in clang_getInclusions() 85 getInclusions(/*IsLocal=*/false, SM.loaded_sloc_entry_size(), TU, CB, in clang_getInclusions()
|
| /openbsd/src/gnu/llvm/clang/lib/Tooling/Syntax/ |
| D | Tokens.cpp | 41 const SourceManager &SM) { in getTokensCovering() argument 46 return SM.isBeforeInTranslationUnit(T.location(), R.getBegin()); in getTokensCovering() 50 return !SM.isBeforeInTranslationUnit(R.getEnd(), T.location()); in getTokensCovering() 69 const SourceManager &SM) { in spelledForExpandedSlow() argument 77 assert(SM.getSLocEntry(TargetFile).isFile()); in spelledForExpandedSlow() 89 auto DecFirst = SM.getDecomposedLoc(First); in spelledForExpandedSlow() 90 auto DecLast = SM.getDecomposedLoc(Last); in spelledForExpandedSlow() 91 auto &ExpFirst = SM.getSLocEntry(DecFirst.first).getExpansion(); in spelledForExpandedSlow() 92 auto &ExpLast = SM.getSLocEntry(DecLast.first).getExpansion(); in spelledForExpandedSlow() 107 SM.getSLocEntry(SM.getFileID(ExpFirst.getExpansionLocStart())) in spelledForExpandedSlow() [all …]
|
| /openbsd/src/gnu/llvm/llvm/lib/Target/NVPTX/ |
| D | NVPTX.td | 22 // - We use the SM version number instead of explicit feature table. 27 // SM Versions 29 "Target SM 2.0">; 31 "Target SM 2.1">; 33 "Target SM 3.0">; 35 "Target SM 3.2">; 37 "Target SM 3.5">; 39 "Target SM 3.7">; 41 "Target SM 5.0">; 43 "Target SM 5.2">; [all …]
|
| /openbsd/src/gnu/llvm/llvm/lib/MCA/ |
| D | Support.cpp | 40 void computeProcResourceMasks(const MCSchedModel &SM, in computeProcResourceMasks() argument 44 assert(Masks.size() == SM.getNumProcResourceKinds() && in computeProcResourceMasks() 50 for (unsigned I = 1, E = SM.getNumProcResourceKinds(); I < E; ++I) { in computeProcResourceMasks() 51 const MCProcResourceDesc &Desc = *SM.getProcResource(I); in computeProcResourceMasks() 59 for (unsigned I = 1, E = SM.getNumProcResourceKinds(); I < E; ++I) { in computeProcResourceMasks() 60 const MCProcResourceDesc &Desc = *SM.getProcResource(I); in computeProcResourceMasks() 74 for (unsigned I = 0, E = SM.getNumProcResourceKinds(); I < E; ++I) { in computeProcResourceMasks() 75 const MCProcResourceDesc &Desc = *SM.getProcResource(I); in computeProcResourceMasks() 83 double computeBlockRThroughput(const MCSchedModel &SM, unsigned DispatchWidth, in computeBlockRThroughput() argument 94 for (unsigned I = 0, E = SM.getNumProcResourceKinds(); I < E; ++I) { in computeBlockRThroughput() [all …]
|
| /openbsd/src/gnu/llvm/clang/include/clang/Basic/ |
| D | PlistSupport.h | 39 const SourceManager &SM, SourceLocation L) { in AddFID() argument 40 FileID FID = SM.getFileID(SM.getExpansionLoc(L)); in AddFID() 50 inline unsigned GetFID(const FIDMap &FIDs, const SourceManager &SM, in GetFID() argument 52 FileID FID = SM.getFileID(SM.getExpansionLoc(L)); in GetFID() 107 inline void EmitLocation(raw_ostream &o, const SourceManager &SM, in EmitLocation() argument 111 FullSourceLoc Loc(SM.getExpansionLoc(L), const_cast<SourceManager &>(SM)); in EmitLocation() 119 EmitInteger(o, GetFID(FM, SM, Loc)) << '\n'; in EmitLocation() 123 inline void EmitRange(raw_ostream &o, const SourceManager &SM, in EmitRange() argument 129 EmitLocation(o, SM, R.getBegin(), FM, indent + 1); in EmitRange() 134 EmitLocation(o, SM, R.getEnd().getLocWithOffset(-1), FM, indent + 1); in EmitRange()
|
| /openbsd/src/gnu/llvm/clang/lib/CodeGen/ |
| D | CoverageMappingGen.cpp | 177 SpellingRegion(SourceManager &SM, SourceLocation LocStart, in SpellingRegion() 179 LineStart = SM.getSpellingLineNumber(LocStart); in SpellingRegion() 180 ColumnStart = SM.getSpellingColumnNumber(LocStart); in SpellingRegion() 181 LineEnd = SM.getSpellingLineNumber(LocEnd); in SpellingRegion() 182 ColumnEnd = SM.getSpellingColumnNumber(LocEnd); in SpellingRegion() 185 SpellingRegion(SourceManager &SM, SourceMappingRegion &R) in SpellingRegion() 186 : SpellingRegion(SM, R.getBeginLoc(), R.getEndLoc()) {} in SpellingRegion() 201 SourceManager &SM; member in __anon678788ec0211::CoverageMappingBuilder 223 CoverageMappingBuilder(CoverageMappingModuleGen &CVM, SourceManager &SM, in CoverageMappingBuilder() argument 225 : CVM(CVM), SM(SM), LangOpts(LangOpts) {} in CoverageMappingBuilder() [all …]
|
| /openbsd/src/gnu/llvm/clang/tools/c-index-test/ |
| D | core_main.cpp | 108 SourceManager &SM = Ctx.getSourceManager(); in handleDeclOccurrence() local 110 Loc = SM.getFileLoc(Loc); in handleDeclOccurrence() 111 FileID FID = SM.getFileID(Loc); in handleDeclOccurrence() 112 unsigned Line = SM.getLineNumber(FID, SM.getFileOffset(Loc)); in handleDeclOccurrence() 113 unsigned Col = SM.getColumnNumber(FID, SM.getFileOffset(Loc)); in handleDeclOccurrence() 146 SourceManager &SM = Ctx.getSourceManager(); in handleModuleOccurrence() local 148 Loc = SM.getFileLoc(Loc); in handleModuleOccurrence() 149 FileID FID = SM.getFileID(Loc); in handleModuleOccurrence() 150 unsigned Line = SM.getLineNumber(FID, SM.getFileOffset(Loc)); in handleModuleOccurrence() 151 unsigned Col = SM.getColumnNumber(FID, SM.getFileOffset(Loc)); in handleModuleOccurrence() [all …]
|
| /openbsd/src/gnu/llvm/clang/include/clang/Lex/ |
| D | Lexer.h | 181 const SourceManager &SM, const LangOptions &LangOpts, 363 const SourceManager &SM, 372 const SourceManager &SM, 378 const SourceManager &SM, 386 const SourceManager &SM, 393 const SourceManager &SM, 401 const SourceManager &SM, in AdvanceToTokenCharacter() argument 404 getTokenPrefixLength(TokStart, Characters, SM, LangOpts)); in AdvanceToTokenCharacter() 423 const SourceManager &SM, 431 const SourceManager &SM, in getAsCharRange() argument [all …]
|
| /openbsd/src/gnu/llvm/llvm/tools/llvm-mca/ |
| D | CodeRegionGenerator.h | 63 llvm::SourceMgr &SM; variable 70 InstrumentRegionCommentConsumer(llvm::SourceMgr &SM, InstrumentRegions &R, in InstrumentRegionCommentConsumer() argument 72 : SM(SM), Regions(R), IM(IM) {} in InstrumentRegionCommentConsumer() 102 AnalysisRegionGenerator(llvm::SourceMgr &SM) : Regions(SM) {} in AnalysisRegionGenerator() argument 114 InstrumentRegionGenerator(llvm::SourceMgr &SM) : Regions(SM) {} in InstrumentRegionGenerator() argument 148 AsmAnalysisRegionGenerator(const Target &T, llvm::SourceMgr &SM, MCContext &C, in AsmAnalysisRegionGenerator() argument 151 : AnalysisRegionGenerator(SM), AsmCodeRegionGenerator(T, C, A, S, I), in AsmAnalysisRegionGenerator() 177 AsmInstrumentRegionGenerator(const Target &T, llvm::SourceMgr &SM, in AsmInstrumentRegionGenerator() argument 181 : InstrumentRegionGenerator(SM), AsmCodeRegionGenerator(T, C, A, S, I), in AsmInstrumentRegionGenerator() 182 CC(SM, Regions, IM) {} in AsmInstrumentRegionGenerator()
|
| D | CodeRegion.cpp | 54 SM.PrintMessage(Loc, llvm::SourceMgr::DK_Error, in beginRegion() 56 SM.PrintMessage(R.startLoc(), llvm::SourceMgr::DK_Note, in beginRegion() 62 SM.PrintMessage(Loc, llvm::SourceMgr::DK_Error, in beginRegion() 64 SM.PrintMessage(R.startLoc(), llvm::SourceMgr::DK_Note, in beginRegion() 104 SM.PrintMessage(Loc, llvm::SourceMgr::DK_Error, in endRegion() 107 SM.PrintMessage(Loc, llvm::SourceMgr::DK_Note, in endRegion() 110 SM.PrintMessage(Loc, llvm::SourceMgr::DK_Note, in endRegion() 120 SM.PrintMessage(Loc, llvm::SourceMgr::DK_Error, in beginRegion() 129 SM.PrintMessage( in beginRegion() 132 SM.PrintMessage(R.startLoc(), llvm::SourceMgr::DK_Note, in beginRegion() [all …]
|
| /openbsd/src/gnu/llvm/clang/lib/StaticAnalyzer/Core/ |
| D | PlistDiagnostics.cpp | 171 const MacroExpansionContext &MacroExpansions, const SourceManager &SM); 188 const SourceManager &SM = PP.getSourceManager(); in EmitRanges() local 192 EmitRange(o, SM, in EmitRanges() 193 Lexer::getAsCharRange(SM.getExpansionRange(R), SM, LangOpts), in EmitRanges() 219 const SourceManager &SM = PP.getSourceManager(); in EmitFixits() local 231 EmitRange(o, SM, Lexer::getAsCharRange(fixit.RemoveRange, SM, LangOpts), in EmitFixits() 245 const SourceManager &SM = PP.getSourceManager(); in ReportControlFlow() local 268 SM.getExpansionLoc(I->getStart().asRange().getBegin())); in ReportControlFlow() 269 EmitRange(o, SM, Lexer::getAsCharRange(StartEdge, SM, LangOpts), FM, in ReportControlFlow() 273 SourceRange EndEdge(SM.getExpansionLoc(I->getEnd().asRange().getBegin())); in ReportControlFlow() [all …]
|
| /openbsd/src/gnu/llvm/clang/lib/Tooling/Refactoring/Extract/ |
| D | SourceExtraction.cpp | 22 bool isSemicolonAtLocation(SourceLocation TokenLoc, const SourceManager &SM, in isSemicolonAtLocation() argument 25 CharSourceRange::getTokenRange(TokenLoc, TokenLoc), SM, in isSemicolonAtLocation() 62 const SourceManager &SM) { in areOnSameLine() argument 64 SM.getSpellingLineNumber(Loc1) == SM.getSpellingLineNumber(Loc2); in areOnSameLine() 74 const SourceManager &SM, in compute() argument 99 if (isSemicolonAtLocation(End, SM, LangOpts)) in compute() 104 std::optional<Token> NextToken = Lexer::findNextToken(End, SM, LangOpts); in compute() 106 areOnSameLine(NextToken->getLocation(), End, SM)) { in compute()
|
| /openbsd/src/gnu/llvm/clang/lib/Edit/ |
| D | Commit.cpp | 24 SourceLocation Commit::Edit::getFileLocation(SourceManager &SM) const { in getFileLocation() 25 SourceLocation Loc = SM.getLocForStartOfFile(Offset.getFID()); in getFileLocation() 31 CharSourceRange Commit::Edit::getFileRange(SourceManager &SM) const { in getFileRange() 32 SourceLocation Loc = getFileLocation(SM); in getFileRange() 36 CharSourceRange Commit::Edit::getInsertFromRange(SourceManager &SM) const { in getInsertFromRange() 37 SourceLocation Loc = SM.getLocForStartOfFile(InsertFromRangeOffs.getFID()); in getInsertFromRange() 232 const SourceManager &SM = SourceMgr; in canInsert() local 233 loc = SM.getTopMacroCallerLoc(loc); in canInsert() 239 if (SM.isInSystemHeader(loc)) in canInsert() 242 std::pair<FileID, unsigned> locInfo = SM.getDecomposedLoc(loc); in canInsert() [all …]
|
| /openbsd/src/gnu/llvm/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
| D | AnalysisManager.h | 125 static bool isInCodeFile(SourceLocation SL, const SourceManager &SM) { in isInCodeFile() argument 126 if (SM.isInMainFile(SL)) in isInCodeFile() 133 SourceLocation IL = SM.getIncludeLoc(SM.getFileID(SL)); in isInCodeFile() 134 if (!IL.isValid() || !SM.isInMainFile(IL)) in isInCodeFile() 138 if (SM.getFilename(IL).contains("UnifiedSource")) { in isInCodeFile() 141 return llvm::StringSwitch<bool>(SM.getFilename(SL).rsplit('.').second) in isInCodeFile() 151 const SourceManager &SM = getASTContext().getSourceManager(); in isInCodeFile() local 152 return isInCodeFile(SL, SM); in isInCodeFile()
|