/freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
H A D | SourceMgr.h | 31 class SourceMgr { 96 SourceMgr() = default; 97 SourceMgr(const SourceMgr &) = delete; 98 SourceMgr &operator=(const SourceMgr &) = delete; 99 SourceMgr(SourceMgr &&) = default; 100 SourceMgr &operator=(SourceMgr &&) = default; 101 ~SourceMgr() = default; 157 void takeSourceBuffersFrom(SourceMgr &SrcMgr, 282 const SourceMgr *SM = nullptr; 287 SourceMgr::DiagKind Kind = SourceMgr::DK_Error; [all …]
|
/freebsd/contrib/llvm-project/llvm/tools/llvm-mca/ |
H A D | CodeRegion.cpp | 34 AnalysisRegions::AnalysisRegions(llvm::SourceMgr &S) : CodeRegions(S) { in AnalysisRegions() 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() 115 InstrumentRegions::InstrumentRegions(llvm::SourceMgr &S) : CodeRegions(S) {} in InstrumentRegions() 120 SM.PrintMessage(Loc, llvm::SourceMgr::DK_Error, in beginRegion() [all …]
|
H A D | CodeRegion.h | 151 llvm::SourceMgr &SM; 159 CodeRegions(llvm::SourceMgr &S) : SM(S), FoundErrors(false) {} in CodeRegions() 171 llvm::SourceMgr &getSourceMgr() const { return SM; } in getSourceMgr() 196 AnalysisRegions(llvm::SourceMgr &S); 206 InstrumentRegions(llvm::SourceMgr &S);
|
/freebsd/contrib/llvm-project/clang/include/clang/AST/ |
H A D | RawCommentList.h | 47 RawComment(const SourceManager &SourceMgr, SourceRange SR, 98 StringRef getRawText(const SourceManager &SourceMgr) const { in getRawText() argument 102 RawText = getRawTextSlow(SourceMgr); in getRawText() 118 bool hasUnsupportedSplice(const SourceManager &SourceMgr) const { in hasUnsupportedSplice() argument 121 StringRef Text = getRawText(SourceMgr); in hasUnsupportedSplice() 150 std::string getFormattedText(const SourceManager &SourceMgr, 165 std::vector<CommentLine> getFormattedLines(const SourceManager &SourceMgr, 203 StringRef getRawTextSlow(const SourceManager &SourceMgr) const; 214 RawCommentList(SourceManager &SourceMgr) : SourceMgr(SourceMgr) {} in RawCommentList() argument 230 SourceManager &SourceMgr;
|
/freebsd/contrib/llvm-project/llvm/lib/FileCheck/ |
H A D | FileCheckImpl.h | 23 #include "llvm/Support/SourceMgr.h" 100 APInt valueFromStringRepr(StringRef StrVal, const SourceMgr &SM) const; 146 getImplicitFormat(const SourceMgr &SM) const { 293 getImplicitFormat(const SourceMgr &SM) const override { in clearValue() 333 getImplicitFormat(const SourceMgr &SM) const override; 457 SourceMgr &SM); 508 static Error get(const SourceMgr &SM, SMLoc Loc, const Twine &ErrMsg, 511 SM.GetMessage(Loc, SourceMgr::DK_Error, ErrMsg), Range); 514 static Error get(const SourceMgr &SM, StringRef Buffer, const Twine &ErrMsg) { 661 const SourceMgr [all...] |
H A D | FileCheck.cpp | 138 const SourceMgr &SM) const { in valueFromStringRepr() 242 BinaryOperation::getImplicitFormat(const SourceMgr &SM) const { in getImplicitFormat() 289 Pattern::parseVariable(StringRef &Str, const SourceMgr &SM) { in parseVariable() 339 const SourceMgr &SM) { in parseNumericVariableDefinition() 376 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseNumericVariableUse() 412 const SourceMgr &SM) { in parseNumericOperand() 465 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseParenExpr() 500 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseBinop() 544 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseCallExpr() 620 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseNumericSubstitutionBlock() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/TableGen/ |
H A D | Error.cpp | 24 SourceMgr SrcMgr; 27 static void PrintMessage(ArrayRef<SMLoc> Loc, SourceMgr::DiagKind Kind, in PrintMessage() 31 if (Kind == SourceMgr::DK_Error) in PrintMessage() 39 SrcMgr.PrintMessage(Loc[i], SourceMgr::DK_Note, in PrintMessage() 50 PrintMessage(NoteLoc, SourceMgr::DK_Note, Msg); in PrintNote() 92 PrintMessage(WarningLoc, SourceMgr::DK_Warning, Msg); in PrintWarning() 96 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Warning, Msg); in PrintWarning() 104 PrintMessage(ErrorLoc, SourceMgr::DK_Error, Msg); in PrintError() 108 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Error, Msg); in PrintError() 114 PrintMessage(Rec->getLoc(), SourceMgr in PrintError() [all...] |
H A D | Parser.cpp | 16 bool llvm::TableGenParseFile(SourceMgr &InputSrcMgr, RecordKeeper &Records) { in TableGenParseFile() 21 SrcMgr = SourceMgr(); in TableGenParseFile() 39 SrcMgr = SourceMgr(); in TableGenParseFile()
|
/freebsd/contrib/llvm-project/llvm/lib/Support/ |
H A D | SourceMgr.cpp | 41 unsigned SourceMgr::AddIncludeFile(const std::string &Filename, in AddIncludeFile() 53 SourceMgr::OpenIncludeFile(const std::string &Filename, in OpenIncludeFile() 73 unsigned SourceMgr::FindBufferContainingLoc(SMLoc Loc) const { in FindBufferContainingLoc() 104 unsigned SourceMgr::SrcBuffer::getLineNumberSpecialized(const char *Ptr) const { in getLineNumberSpecialized() 122 unsigned SourceMgr::SrcBuffer::getLineNumber(const char *Ptr) const { in getLineNumber() 135 const char *SourceMgr::SrcBuffer::getPointerForLineNumberSpecialized( in getPointerForLineNumberSpecialized() 158 SourceMgr::SrcBuffer::getPointerForLineNumber(unsigned LineNo) const { in getPointerForLineNumber() 170 SourceMgr::SrcBuffer::SrcBuffer(SourceMgr::SrcBuffer &&Other) in SrcBuffer() 176 SourceMgr::SrcBuffer::~SrcBuffer() { in ~SrcBuffer() 192 SourceMgr::getLineAndColumn(SMLoc Loc, unsigned BufferID) const { in getLineAndColumn() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/Format/ |
H A D | QualifierAlignmentFixer.cpp | 57 static void replaceToken(const SourceManager &SourceMgr, in replaceToken() argument 60 auto Replacement = tooling::Replacement(SourceMgr, Range, NewText); in replaceToken() 69 static void removeToken(const SourceManager &SourceMgr, in removeToken() argument 74 replaceToken(SourceMgr, Fixes, Range, ""); in removeToken() 77 static void insertQualifierAfter(const SourceManager &SourceMgr, in insertQualifierAfter() argument 87 replaceToken(SourceMgr, Fixes, Range, NewText); in insertQualifierAfter() 90 static void insertQualifierBefore(const SourceManager &SourceMgr, in insertQualifierBefore() argument 100 replaceToken(SourceMgr, Fixes, Range, NewText); in insertQualifierBefore() 115 static void rotateTokens(const SourceManager &SourceMgr, in rotateTokens() argument 152 replaceToken(SourceMgr, Fixes, Range, NewText); in rotateTokens() [all …]
|
H A D | UsingDeclarationsSorter.cpp | 139 const SourceManager &SourceMgr, tooling::Replacements *Fixes, in endUsingDeclarationBlock() argument 173 auto Err = Fixes->add(tooling::Replacement(SourceMgr, Range, "")); in endUsingDeclarationBlock() 187 StringRef Text(SourceMgr.getCharacterData(SortedBegin), in endUsingDeclarationBlock() 188 SourceMgr.getCharacterData(SortedEnd) - in endUsingDeclarationBlock() 189 SourceMgr.getCharacterData(SortedBegin)); in endUsingDeclarationBlock() 191 StringRef OldText(SourceMgr.getCharacterData(Begin), in endUsingDeclarationBlock() 192 SourceMgr.getCharacterData(End) - in endUsingDeclarationBlock() 193 SourceMgr.getCharacterData(Begin)); in endUsingDeclarationBlock() 197 auto Err = Fixes->add(tooling::Replacement(SourceMgr, Range, Text)); in endUsingDeclarationBlock() 215 const SourceManager &SourceMgr = Env.getSourceManager(); in analyze() local [all …]
|
H A D | WhitespaceManager.h | 37 WhitespaceManager(const SourceManager &SourceMgr, const FormatStyle &Style, in WhitespaceManager() argument 39 : SourceMgr(SourceMgr), Style(Style), UseCRLF(UseCRLF) {} in WhitespaceManager() 93 IsBeforeInFile(const SourceManager &SourceMgr) : SourceMgr(SourceMgr) {} in IsBeforeInFile() 97 const SourceManager &SourceMgr; 363 const SourceManager &SourceMgr; variable
|
H A D | AffectedRangeManager.h | 27 AffectedRangeManager(const SourceManager &SourceMgr, in AffectedRangeManager() argument 29 : SourceMgr(SourceMgr), Ranges(Ranges.begin(), Ranges.end()) {} in AffectedRangeManager() 58 const SourceManager &SourceMgr; variable
|
H A D | UnwrappedLineFormatter.h | 32 const SourceManager &SourceMgr, in UnwrappedLineFormatter() argument 35 Keywords(Keywords), SourceMgr(SourceMgr), Status(Status) {} in UnwrappedLineFormatter() 68 const SourceManager &SourceMgr; variable
|
H A D | IntegerLiteralSeparatorFixer.cpp | 78 const auto &SourceMgr = Env.getSourceManager(); in process() local 79 AffectedRangeManager AffectedRangeMgr(SourceMgr, Env.getCharRanges()); in process() 83 Lexer Lex(ID, SourceMgr.getBufferOrFake(ID), SourceMgr, LangOpts); in process() 94 auto Text = StringRef(SourceMgr.getCharacterData(Location), Length); in process() 161 tooling::Replacement(SourceMgr, Location, Length, Formatted))); in process()
|
/freebsd/contrib/llvm-project/llvm/tools/llvm-mc/ |
H A D | Disassembler.cpp | 25 #include "llvm/Support/SourceMgr.h" 35 SourceMgr &SM, MCStreamer &Streamer, bool InAtomicBlock, in PrintInsts() 51 SourceMgr::DK_Warning, in PrintInsts() 64 SourceMgr::DK_Warning, in PrintInsts() 100 SourceMgr &SM) { in ByteArrayFromString() 114 SM.PrintMessage(SMLoc::getFromPointer(Value.data()), SourceMgr::DK_Error, in ByteArrayFromString() 132 MemoryBuffer &Buffer, SourceMgr &SM, in disassemble() 172 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble() 181 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble() 199 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr in disassemble() [all...] |
/freebsd/contrib/llvm-project/clang/lib/Lex/ |
H A D | PPConditionalDirectiveRecord.cpp | 19 : SourceMgr(SM) { in PPConditionalDirectiveRecord() 29 CondDirectiveLocs, Range.getBegin(), CondDirectiveLoc::Comp(SourceMgr)); in rangeIntersectsConditionalDirective() 33 if (SourceMgr.isBeforeInTranslationUnit(Range.getEnd(), low->getLoc())) in rangeIntersectsConditionalDirective() 38 Range.getEnd(), CondDirectiveLoc::Comp(SourceMgr)); in rangeIntersectsConditionalDirective() 53 if (SourceMgr.isBeforeInTranslationUnit(CondDirectiveLocs.back().getLoc(), in findConditionalDirectiveRegionLoc() 58 CondDirectiveLocs, Loc, CondDirectiveLoc::Comp(SourceMgr)); in findConditionalDirectiveRegionLoc() 66 if (SourceMgr.isInSystemHeader(DirLoc.getLoc())) in addCondDirectiveLoc() 70 SourceMgr.isBeforeInTranslationUnit(CondDirectiveLocs.back().getLoc(), in addCondDirectiveLoc()
|
H A D | ScratchBuffer.cpp | 24 : SourceMgr(SM), CurBuffer(nullptr) { in ScratchBuffer() 40 SourceMgr.getSLocEntry(SourceMgr.getFileID(BufferStartLoc)) in getToken() 80 FileID FID = SourceMgr.createFileID(std::move(OwnBuf)); in AllocScratchBuffer() 81 BufferStartLoc = SourceMgr.getLocForStartOfFile(FID); in AllocScratchBuffer()
|
H A D | PreprocessingRecord.cpp | 55 PreprocessingRecord::PreprocessingRecord(SourceManager &SM) : SourceMgr(SM) {} in PreprocessingRecord() 111 return isPreprocessedEntityIfInFileID(PPE, FID, SourceMgr); in isEntityInFileID() 123 FID, SourceMgr); in isEntityInFileID() 131 FID, SourceMgr); in isEntityInFileID() 139 assert(!SourceMgr.isBeforeInTranslationUnit(Range.getEnd(),Range.getBegin())); in getPreprocessedEntitiesInRangeSlow() 145 if (!ExternalSource || SourceMgr.isLocalSourceLocation(Range.getBegin())) in getPreprocessedEntitiesInRangeSlow() 171 assert(!SourceMgr.isBeforeInTranslationUnit(Range.getEnd(),Range.getBegin())); in findLocalPreprocessedEntitiesInRange() 212 if (SourceMgr.isLoadedSourceLocation(Loc)) in findBeginLocalPreprocessedEntity() 229 if (SourceMgr.isBeforeInTranslationUnit((*I)->getSourceRange().getEnd(), in findBeginLocalPreprocessedEntity() 243 if (SourceMgr.isLoadedSourceLocation(Loc)) in findEndLocalPreprocessedEntity() [all …]
|
H A D | Preprocessor.cpp | 90 FileMgr(Headers.getFileMgr()), SourceMgr(SM), in Preprocessor() 91 ScratchBuf(new ScratchBuffer(SourceMgr)), HeaderInfo(Headers), in Preprocessor() 254 const char *Start = SourceMgr.getCharacterData(Tok.getLocation()); in DumpToken() 265 Loc.print(llvm::errs(), SourceMgr); in DumpLocation() 368 Def = I->second.findDirectiveAtLoc(Loc, SourceMgr); in getLastMacroWithSpelling() 379 SourceMgr.isBeforeInTranslationUnit(BestLocation, Location))) { in getLastMacroWithSpelling() 406 SourceMgr.getMemoryBufferForFileOrNone(File); in SetCodeCompletionPoint() 431 SourceMgr.getFileEntryForID(SourceMgr.getMainFileID()) == File) { in SetCodeCompletionPoint() 448 SourceMgr.overrideFileContents(File, std::move(NewBuffer)); in SetCodeCompletionPoint() 500 Loc = SourceMgr.createExpansionLoc(Loc, ExpansionLocStart, in CreateString() [all …]
|
H A D | PPLexerChange.cpp | 82 SourceLocation FileStart = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile() 84 << std::string(SourceMgr.getBufferName(FileStart)) << ""; in EnterSourceFile() 89 SourceMgr.getFileEntryForID(FID) == CodeCompletionFile) { in EnterSourceFile() 90 CodeCompletionFileLoc = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile() 98 if (OptionalFileEntryRef File = SourceMgr.getFileEntryRefForID(FID)) { in EnterSourceFile() 133 SourceMgr.getFileCharacteristic(CurLexer->getFileLoc()); in EnterSourceFileWithLexer() 294 const FileID &File = SourceMgr.translateFile(UmbrellaHeader->Entry); in diagnoseMissingHeaderInUmbrellaDir() 295 SourceLocation ExpectedHeadersLoc = SourceMgr.getLocForEndOfFile(File); in diagnoseMissingHeaderInUmbrellaDir() 446 SourceMgr.getLocForStartOfFile(CurPPLexer->getFileID()) == in HandleEndOfFile() 459 (SourceMgr.getIncludeLoc(CurPPLexer->getFileID()).isValid() || in HandleEndOfFile() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/Edit/ |
H A D | EditedSource.cpp | 37 assert(SourceMgr.isMacroArgExpansion(Loc)); in deconstructMacroArgLoc() 39 SourceMgr.getImmediateExpansionRange(Loc).getBegin(); in deconstructMacroArgLoc() 41 SourceMgr.getImmediateExpansionRange(DefArgLoc).getBegin(); in deconstructMacroArgLoc() 43 while (SourceMgr.isMacroBodyExpansion(ExpansionLoc)) in deconstructMacroArgLoc() 45 SourceMgr.getImmediateExpansionRange(ExpansionLoc).getBegin(); in deconstructMacroArgLoc() 47 StringRef ArgName = Lexer::getSpelling(SourceMgr.getSpellingLoc(DefArgLoc), in deconstructMacroArgLoc() 48 Buf, SourceMgr, LangOpts); in deconstructMacroArgLoc() 52 SourceMgr.getSpellingLoc(DefArgLoc)}; in deconstructMacroArgLoc() 81 if (SourceMgr.isMacroArgExpansion(OrigLoc)) { in canInsertInOffset() 119 if (SourceMgr.isMacroArgExpansion(OrigLoc)) { in commitInsert() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/AsmParser/ |
H A D | Parser.cpp | 28 SourceMgr SM; in parseAssemblyInto() 66 Err = SMDiagnostic(Filename, SourceMgr::DK_Error, in parseAssemblyFile() 109 Err = SMDiagnostic(Filename, SourceMgr::DK_Error, in parseAssemblyFileWithIndex() 147 SourceMgr SM; in parseSummaryIndexAssemblyInto() 174 Err = SMDiagnostic(Filename, SourceMgr::DK_Error, in parseSummaryIndexAssemblyFile() 190 SourceMgr SM; in parseConstantValue() 207 SourceMgr SM; in parseType() 211 SourceMgr::DK_Error, "expected end of string"); in parseType() 219 SourceMgr SM; in parseTypeAtBeginning() 234 SourceMgr SM; in parseDIExpressionBodyAtBeginning()
|
/freebsd/contrib/llvm-project/clang/lib/Frontend/ |
H A D | VerifyDiagnosticConsumer.cpp | 869 static unsigned PrintUnexpected(DiagnosticsEngine &Diags, SourceManager *SourceMgr, in PrintUnexpected() argument 878 if (I->first.isInvalid() || !SourceMgr) in PrintUnexpected() 883 SourceMgr->getFileEntryRefForID(SourceMgr->getFileID(I->first))) in PrintUnexpected() 885 OS << " Line " << SourceMgr->getPresumedLineNumber(I->first); in PrintUnexpected() 900 SourceManager &SourceMgr, in PrintExpected() argument 911 OS << "\n File " << SourceMgr.getFilename(D->DiagnosticLoc); in PrintExpected() 915 OS << " Line " << SourceMgr.getPresumedLineNumber(D->DiagnosticLoc); in PrintExpected() 918 << SourceMgr.getFilename(D->DirectiveLoc) << ':' in PrintExpected() 919 << SourceMgr.getPresumedLineNumber(D->DirectiveLoc) << ')'; in PrintExpected() 948 static unsigned CheckLists(DiagnosticsEngine &Diags, SourceManager &SourceMgr, in CheckLists() argument [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/FileCheck/ |
H A D | FileCheck.h | 26 class SourceMgr; variable 170 FileCheckDiag(const SourceMgr &SM, const Check::FileCheckType &CheckTy, 197 readCheckFile(SourceMgr &SM, StringRef Buffer, 212 bool checkInput(SourceMgr &SM, StringRef Buffer,
|