Home
last modified time | relevance | path

Searched refs:SourceMgr (Results 1 – 25 of 174) sorted by relevance

1234567

/freebsd/contrib/llvm-project/llvm/include/llvm/Support/
H A DSourceMgr.h31 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 DCodeRegion.cpp34 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 DCodeRegion.h151 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 DRawCommentList.h47 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 DFileCheckImpl.h23 #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 DFileCheck.cpp138 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 DError.cpp24 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 DParser.cpp16 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 DSourceMgr.cpp41 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 DQualifierAlignmentFixer.cpp57 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 DUsingDeclarationsSorter.cpp139 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 DWhitespaceManager.h37 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 DAffectedRangeManager.h27 AffectedRangeManager(const SourceManager &SourceMgr, in AffectedRangeManager() argument
29 : SourceMgr(SourceMgr), Ranges(Ranges.begin(), Ranges.end()) {} in AffectedRangeManager()
58 const SourceManager &SourceMgr; variable
H A DUnwrappedLineFormatter.h32 const SourceManager &SourceMgr, in UnwrappedLineFormatter() argument
35 Keywords(Keywords), SourceMgr(SourceMgr), Status(Status) {} in UnwrappedLineFormatter()
68 const SourceManager &SourceMgr; variable
H A DIntegerLiteralSeparatorFixer.cpp78 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 DDisassembler.cpp25 #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 DPPConditionalDirectiveRecord.cpp19 : 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 DScratchBuffer.cpp24 : 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 DPreprocessingRecord.cpp55 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 DPreprocessor.cpp90 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 DPPLexerChange.cpp82 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 DEditedSource.cpp37 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 DParser.cpp28 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 DVerifyDiagnosticConsumer.cpp869 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 DFileCheck.h26 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,

1234567