Home
last modified time | relevance | path

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

123456789

/openbsd-src/gnu/llvm/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 …]
/openbsd-src/gnu/llvm/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 DCodeRegionGenerator.h63 llvm::SourceMgr &SM;
70 InstrumentRegionCommentConsumer(llvm::SourceMgr &SM, InstrumentRegions &R, in InstrumentRegionCommentConsumer()
102 AnalysisRegionGenerator(llvm::SourceMgr &SM) : Regions(SM) {} in AnalysisRegionGenerator()
114 InstrumentRegionGenerator(llvm::SourceMgr &SM) : Regions(SM) {} in InstrumentRegionGenerator()
148 AsmAnalysisRegionGenerator(const Target &T, llvm::SourceMgr &SM, MCContext &C, in AsmAnalysisRegionGenerator()
177 AsmInstrumentRegionGenerator(const Target &T, llvm::SourceMgr &SM, in AsmInstrumentRegionGenerator()
/openbsd-src/gnu/llvm/clang/lib/AST/
H A DRawCommentList.cpp110 RawComment::RawComment(const SourceManager &SourceMgr, SourceRange SR, in RawComment() argument
116 if (SR.getBegin() == SR.getEnd() || getRawText(SourceMgr).empty()) { in RawComment()
130 SourceMgr.getDecomposedLoc(Range.getBegin()); in RawComment()
134 SourceMgr.getBufferData(BeginFileID, &Invalid).data(); in RawComment()
153 StringRef RawComment::getRawTextSlow(const SourceManager &SourceMgr) const { in getRawTextSlow()
160 SourceMgr.getDecomposedLoc(Range.getBegin()); in getRawTextSlow()
161 std::tie(EndFileID, EndOffset) = SourceMgr.getDecomposedLoc(Range.getEnd()); in getRawTextSlow()
171 const char *BufferStart = SourceMgr.getBufferData(BeginFileID, in getRawTextSlow()
285 SourceMgr.getDecomposedLoc(RC.getBeginLoc()); in addComment()
317 commentsStartOnSameColumn(SourceMgr, C1, C2))) && in addComment()
[all …]
/openbsd-src/gnu/llvm/clang/lib/Format/
H A DQualifierAlignmentFixer.cpp107 static void replaceToken(const SourceManager &SourceMgr, in replaceToken() argument
110 auto Replacement = tooling::Replacement(SourceMgr, Range, NewText); in replaceToken()
119 static void removeToken(const SourceManager &SourceMgr, in removeToken() argument
124 replaceToken(SourceMgr, Fixes, Range, ""); in removeToken()
127 static void insertQualifierAfter(const SourceManager &SourceMgr, in insertQualifierAfter() argument
139 replaceToken(SourceMgr, Fixes, Range, NewText); in insertQualifierAfter()
142 static void insertQualifierBefore(const SourceManager &SourceMgr, in insertQualifierBefore() argument
152 replaceToken(SourceMgr, Fixes, Range, NewText); in insertQualifierBefore()
167 static void rotateTokens(const SourceManager &SourceMgr, in rotateTokens() argument
204 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 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 DWhitespaceManager.h42 WhitespaceManager(const SourceManager &SourceMgr, const FormatStyle &Style, in WhitespaceManager() argument
44 : SourceMgr(SourceMgr), Style(Style), UseCRLF(UseCRLF) {} in WhitespaceManager()
98 IsBeforeInFile(const SourceManager &SourceMgr) : SourceMgr(SourceMgr) {} in IsBeforeInFile()
102 const SourceManager &SourceMgr;
350 const SourceManager &SourceMgr; variable
H A DUnwrappedLineFormatter.h34 const SourceManager &SourceMgr, in UnwrappedLineFormatter() argument
37 Keywords(Keywords), SourceMgr(SourceMgr), Status(Status) {} in UnwrappedLineFormatter()
70 const SourceManager &SourceMgr; variable
/openbsd-src/gnu/llvm/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::DK_Error, Msg); 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()
/openbsd-src/gnu/llvm/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 …]
/openbsd-src/gnu/llvm/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()
139 std::string getFormattedText(const SourceManager &SourceMgr,
154 std::vector<CommentLine> getFormattedLines(const SourceManager &SourceMgr,
186 StringRef getRawTextSlow(const SourceManager &SourceMgr) const;
197 RawCommentList(SourceManager &SourceMgr) : SourceMgr(SourceMgr) {} in RawCommentList() argument
213 SourceManager &SourceMgr;
/openbsd-src/gnu/llvm/llvm/lib/FileCheck/
H A DFileCheckImpl.h104 const SourceMgr &SM) const;
193 getImplicitFormat(const SourceMgr &SM) const { in getImplicitFormat()
341 getImplicitFormat(const SourceMgr &SM) const override { in getImplicitFormat()
382 getImplicitFormat(const SourceMgr &SM) const override;
506 SourceMgr &SM);
557 static Error get(const SourceMgr &SM, SMLoc Loc, const Twine &ErrMsg,
560 SM.GetMessage(Loc, SourceMgr::DK_Error, ErrMsg), Range);
563 static Error get(const SourceMgr &SM, StringRef Buffer, const Twine &ErrMsg) { in get()
710 const SourceMgr &SM);
724 FileCheckPatternContext *Context, const SourceMgr &SM);
[all …]
H A DFileCheck.cpp129 const SourceMgr &SM) const { in valueFromStringRepr()
392 BinaryOperation::getImplicitFormat(const SourceMgr &SM) const { in getImplicitFormat()
440 Pattern::parseVariable(StringRef &Str, const SourceMgr &SM) { in parseVariable()
484 const SourceMgr &SM) { in parseNumericVariableDefinition()
522 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseNumericVariableUse()
558 const SourceMgr &SM) { in parseNumericOperand()
615 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseParenExpr()
650 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseBinop()
694 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseCallExpr()
770 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseNumericSubstitutionBlock()
[all …]
/openbsd-src/gnu/llvm/llvm/tools/llvm-ml/
H A DDisassembler.cpp34 SourceMgr &SM, raw_ostream &Out, MCStreamer &Streamer, in PrintInsts()
50 SourceMgr::DK_Warning, "invalid instruction encoding"); in PrintInsts()
62 SourceMgr::DK_Warning, in PrintInsts()
96 SourceMgr &SM) { in ByteArrayFromString()
110 SM.PrintMessage(SMLoc::getFromPointer(Value.data()), SourceMgr::DK_Error, in ByteArrayFromString()
128 MemoryBuffer &Buffer, SourceMgr &SM, in disassemble()
170 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
179 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
197 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
/openbsd-src/gnu/llvm/llvm/tools/llvm-mc/
H A DDisassembler.cpp36 SourceMgr &SM, raw_ostream &Out, in PrintInsts()
53 SourceMgr::DK_Warning, in PrintInsts()
66 SourceMgr::DK_Warning, in PrintInsts()
102 SourceMgr &SM) { in ByteArrayFromString()
116 SM.PrintMessage(SMLoc::getFromPointer(Value.data()), SourceMgr::DK_Error, in ByteArrayFromString()
134 MemoryBuffer &Buffer, SourceMgr &SM, in disassemble()
174 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
183 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
201 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
/openbsd-src/gnu/llvm/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 …]
/openbsd-src/gnu/llvm/clang/lib/Rewrite/
H A DRewriter.cpp170 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRangeSize()
203 const char *Ptr = SourceMgr->getCharacterData(Range.getBegin()); in getRewrittenText()
209 Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRewrittenText()
220 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRewrittenText()
235 std::pair<FileID, unsigned> V = SourceMgr->getDecomposedLoc(Loc); in getLocationOffsetAndFileID()
248 StringRef MB = SourceMgr->getBufferData(FID); in getEditBuffer()
264 StringRef MB = SourceMgr->getBufferData(FID); in InsertText()
266 unsigned lineNo = SourceMgr->getLineNumber(FID, StartOffs) - 1; in InsertText()
268 &SourceMgr->getSLocEntry(FID).getFile().getContentCache(); in InsertText()
341 StringRef MB = SourceMgr->getBufferData(FID); in ReplaceText()
[all …]
/openbsd-src/gnu/llvm/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 …]
H A DCommit.cpp44 : SourceMgr(Editor.getSourceManager()), LangOpts(Editor.getLangOpts()), in Commit()
232 const SourceManager &SM = SourceMgr; in canInsert()
255 SourceLocation spellLoc = SourceMgr.getSpellingLoc(loc); in canInsertAfterToken()
256 unsigned tokLen = Lexer::MeasureTokenLength(spellLoc, SourceMgr, LangOpts); in canInsertAfterToken()
262 const SourceManager &SM = SourceMgr; in canInsertAfterToken()
272 loc = Lexer::getLocForEndOfToken(loc, 0, SourceMgr, LangOpts); in canInsertAfterToken()
298 const SourceManager &SM = SourceMgr; in canRemoveRange()
332 StringRef file = SourceMgr.getBufferData(Offs.getFID(), &invalidTemp); in canReplaceText()
342 return Lexer::isAtStartOfMacroExpansion(loc, SourceMgr, LangOpts, MacroBegin); in isAtStartOfMacroExpansion()
347 return Lexer::isAtEndOfMacroExpansion(loc, SourceMgr, LangOpts, MacroEnd); in isAtEndOfMacroExpansion()
/openbsd-src/gnu/llvm/clang/lib/Tooling/Refactoring/Rename/
H A DUSRFindingAction.cpp235 bool FindSymbol(ASTContext &Context, const SourceManager &SourceMgr, in FindSymbol() argument
238 const FileID MainFileID = SourceMgr.getMainFileID(); in FindSymbol()
240 if (SymbolOffset >= SourceMgr.getFileIDSize(MainFileID)) { in FindSymbol()
246 << SourceMgr.getFileEntryForID(MainFileID)->getName() << SymbolOffset; in FindSymbol()
250 const SourceLocation Point = SourceMgr.getLocForStartOfFile(MainFileID) in FindSymbol()
258 FullSourceLoc FullLoc(Point, SourceMgr); in FindSymbol()
288 const SourceManager &SourceMgr = Context.getSourceManager(); in HandleTranslationUnit() local
290 if (!FindSymbol(Context, SourceMgr, Offset, "")) in HandleTranslationUnit()
294 if (!FindSymbol(Context, SourceMgr, 0, QualifiedName)) in HandleTranslationUnit()
/openbsd-src/gnu/llvm/llvm/lib/AsmParser/
H A DParser.cpp27 SourceMgr SM; in parseAssemblyInto()
65 Err = SMDiagnostic(Filename, SourceMgr::DK_Error, in parseAssemblyFile()
108 Err = SMDiagnostic(Filename, SourceMgr::DK_Error, in parseAssemblyFileWithIndex()
146 SourceMgr SM; in parseSummaryIndexAssemblyInto()
173 Err = SMDiagnostic(Filename, SourceMgr::DK_Error, in parseSummaryIndexAssemblyFile()
189 SourceMgr SM; in parseConstantValue()
206 SourceMgr SM; in parseType()
210 SourceMgr::DK_Error, "expected end of string"); in parseType()
218 SourceMgr SM; in parseTypeAtBeginning()

123456789