Home
last modified time | relevance | path

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

12345678

/freebsd/contrib/llvm-project/llvm/include/llvm/Support/
H A DSourceMgr.h32 class SourceMgr {
97 SourceMgr() = default;
98 SourceMgr(const SourceMgr &) = delete;
99 SourceMgr &operator=(const SourceMgr &) = delete;
100 SourceMgr(SourceMgr &&) = default;
101 SourceMgr &operator=(SourceMgr &&) = default;
102 ~SourceMgr() = default;
158 void takeSourceBuffersFrom(SourceMgr &SrcMgr,
283 const SourceMgr *SM = nullptr;
288 SourceMgr::DiagKind Kind = SourceMgr::DK_Error;
[all …]
/freebsd/contrib/llvm-project/clang/lib/AST/
H A DRawCommentList.cpp108 RawComment::RawComment(const SourceManager &SourceMgr, SourceRange SR, in RawComment() argument
114 if (SR.getBegin() == SR.getEnd() || getRawText(SourceMgr).empty()) { in RawComment()
128 SourceMgr.getDecomposedLoc(Range.getBegin()); in RawComment()
132 SourceMgr.getBufferData(BeginFileID, &Invalid).data(); in RawComment()
151 StringRef RawComment::getRawTextSlow(const SourceManager &SourceMgr) const { in getRawTextSlow()
158 SourceMgr.getDecomposedLoc(Range.getBegin()); in getRawTextSlow()
159 std::tie(EndFileID, EndOffset) = SourceMgr.getDecomposedLoc(Range.getEnd()); in getRawTextSlow()
169 const char *BufferStart = SourceMgr.getBufferData(BeginFileID, in getRawTextSlow()
282 FileIDAndOffset Loc = SourceMgr.getDecomposedLoc(RC.getBeginLoc()); in addComment()
314 commentsStartOnSameColumn(SourceMgr, C1, C2))) && in addComment()
[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 …]
/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/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/llvm/lib/TableGen/
H A DError.cpp24 SourceMgr SrcMgr;
27 static void PrintMessage(ArrayRef<SMLoc> Locs, SourceMgr::DiagKind Kind, in PrintMessage()
31 if (Kind == SourceMgr::DK_Error) in PrintMessage()
39 SrcMgr.PrintMessage(Loc, SourceMgr::DK_Note, in PrintMessage()
61 PrintMessage(NoteLoc, SourceMgr::DK_Note, Msg); in PrintNote()
95 PrintMessage(WarningLoc, SourceMgr::DK_Warning, Msg); in PrintWarning()
99 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Warning, Msg); in PrintWarning()
111 PrintMessage(ErrorLoc, SourceMgr::DK_Error, Msg); in PrintError()
115 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Error, Msg); in PrintError()
121 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()
/freebsd/contrib/llvm-project/llvm/lib/FileCheck/
H A DFileCheckImpl.h102 const SourceMgr &SM) const;
152 getImplicitFormat(const SourceMgr &SM) const { in getImplicitFormat()
299 getImplicitFormat(const SourceMgr &SM) const override { in getImplicitFormat()
339 getImplicitFormat(const SourceMgr &SM) const override;
479 defineCmdlineVariables(ArrayRef<StringRef> CmdlineDefines, SourceMgr &SM);
530 static Error get(const SourceMgr &SM, SMLoc Loc, const Twine &ErrMsg,
533 SM.GetMessage(Loc, SourceMgr::DK_Error, ErrMsg), Range);
536 static Error get(const SourceMgr &SM, StringRef Buffer, const Twine &ErrMsg) { in get()
683 parseVariable(StringRef &Str, const SourceMgr &SM);
698 FileCheckPatternContext *Context, const SourceMgr &SM);
[all …]
H A DFileCheck.cpp137 const SourceMgr &SM) const { in valueFromStringRepr()
241 BinaryOperation::getImplicitFormat(const SourceMgr &SM) const { in getImplicitFormat()
329 Pattern::parseVariable(StringRef &Str, const SourceMgr &SM) { in parseVariable()
379 const SourceMgr &SM) { in parseNumericVariableDefinition()
416 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseNumericVariableUse()
449 const SourceMgr &SM) { in parseNumericOperand()
502 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseParenExpr()
537 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseBinop()
581 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseCallExpr()
657 FileCheckPatternContext *Context, const SourceMgr &SM) { in parseNumericSubstitutionBlock()
[all …]
/freebsd/contrib/llvm-project/llvm/tools/llvm-mc/
H A DDisassembler.cpp36 SourceMgr &SM, MCStreamer &Streamer, bool InAtomicBlock, in PrintInsts()
56 SourceMgr::DK_Warning, in PrintInsts()
69 SourceMgr::DK_Warning, in PrintInsts()
103 SourceMgr &SM, bool HexBytes) { in byteArrayFromString()
118 SourceMgr::DK_Error, "expected two hex digits"); in byteArrayFromString()
127 SourceMgr::DK_Error, "invalid input token"); in byteArrayFromString()
134 SM.PrintMessage(SMLoc::getFromPointer(Value.data()), SourceMgr::DK_Error, in byteArrayFromString()
152 MemoryBuffer &Buffer, SourceMgr &SM, in disassemble()
188 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
197 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
[all …]
/freebsd/contrib/llvm-project/clang/lib/Format/
H A DUsingDeclarationsSorter.cpp139 const SourceManager &SourceMgr, tooling::Replacements *Fixes, in endUsingDeclarationBlock() argument
172 auto Err = Fixes->add(tooling::Replacement(SourceMgr, Range, "")); in endUsingDeclarationBlock()
186 StringRef Text(SourceMgr.getCharacterData(SortedBegin), in endUsingDeclarationBlock()
187 SourceMgr.getCharacterData(SortedEnd) - in endUsingDeclarationBlock()
188 SourceMgr.getCharacterData(SortedBegin)); in endUsingDeclarationBlock()
190 StringRef OldText(SourceMgr.getCharacterData(Begin), in endUsingDeclarationBlock()
191 SourceMgr.getCharacterData(End) - in endUsingDeclarationBlock()
192 SourceMgr.getCharacterData(Begin)); in endUsingDeclarationBlock()
196 auto Err = Fixes->add(tooling::Replacement(SourceMgr, Range, Text)); in endUsingDeclarationBlock()
214 const SourceManager &SourceMgr = Env.getSourceManager(); in analyze() local
[all …]
H A DQualifierAlignmentFixer.cpp54 static void replaceToken(const SourceManager &SourceMgr, in replaceToken() argument
57 auto Replacement = tooling::Replacement(SourceMgr, Range, NewText); in replaceToken()
66 static void removeToken(const SourceManager &SourceMgr, in removeToken() argument
71 replaceToken(SourceMgr, Fixes, Range, ""); in removeToken()
74 static void insertQualifierAfter(const SourceManager &SourceMgr, in insertQualifierAfter() argument
84 replaceToken(SourceMgr, Fixes, Range, NewText); in insertQualifierAfter()
87 static void insertQualifierBefore(const SourceManager &SourceMgr, in insertQualifierBefore() argument
97 replaceToken(SourceMgr, Fixes, Range, NewText); in insertQualifierBefore()
112 static void rotateTokens(const SourceManager &SourceMgr, in rotateTokens() argument
151 replaceToken(SourceMgr, Fixes, Range, NewText); in rotateTokens()
[all …]
H A DAffectedRangeManager.h27 AffectedRangeManager(const SourceManager &SourceMgr, in AffectedRangeManager() argument
29 : SourceMgr(SourceMgr), Ranges(Ranges) {} in AffectedRangeManager()
58 const SourceManager &SourceMgr; variable
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 DUnwrappedLineFormatter.h32 const SourceManager &SourceMgr, in UnwrappedLineFormatter() argument
35 Keywords(Keywords), SourceMgr(SourceMgr), Status(Status) {} in UnwrappedLineFormatter()
68 const SourceManager &SourceMgr; variable
H A DObjCPropertyAttributeOrderFixer.cpp36 const SourceManager &SourceMgr, tooling::Replacements &Fixes, in sortPropertyAttributes() argument
145 auto Replacement = tooling::Replacement(SourceMgr, Range, NewText); in sortPropertyAttributes()
154 const SourceManager &SourceMgr, const AdditionalKeywords &Keywords, in analyzeObjCPropertyDecl() argument
173 sortPropertyAttributes(SourceMgr, Fixes, LParenTok->Next, RParenTok); in analyzeObjCPropertyDecl()
183 const SourceManager &SourceMgr = Env.getSourceManager(); in analyze() local
204 analyzeObjCPropertyDecl(SourceMgr, Keywords, Fixes, Tok); in analyze()
/freebsd/contrib/llvm-project/clang/lib/Rewrite/
H A DRewriter.cpp71 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRangeSize()
104 const char *Ptr = SourceMgr->getCharacterData(Range.getBegin()); in getRewrittenText()
110 Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRewrittenText()
121 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRewrittenText()
136 FileIDAndOffset V = SourceMgr->getDecomposedLoc(Loc); in getLocationOffsetAndFileID()
149 StringRef MB = SourceMgr->getBufferData(FID); in getEditBuffer()
165 StringRef MB = SourceMgr->getBufferData(FID); in InsertText()
167 unsigned lineNo = SourceMgr->getLineNumber(FID, StartOffs) - 1; in InsertText()
169 &SourceMgr->getSLocEntry(FID).getFile().getContentCache(); in InsertText()
242 StringRef MB = SourceMgr->getBufferData(FID); in ReplaceText()
[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.cpp52 PreprocessingRecord::PreprocessingRecord(SourceManager &SM) : SourceMgr(SM) {} in PreprocessingRecord()
108 return isPreprocessedEntityIfInFileID(PPE, FID, SourceMgr); in isEntityInFileID()
120 FID, SourceMgr); in isEntityInFileID()
128 FID, SourceMgr); in isEntityInFileID()
136 assert(!SourceMgr.isBeforeInTranslationUnit(Range.getEnd(),Range.getBegin())); in getPreprocessedEntitiesInRangeSlow()
142 if (!ExternalSource || SourceMgr.isLocalSourceLocation(Range.getBegin())) in getPreprocessedEntitiesInRangeSlow()
168 assert(!SourceMgr.isBeforeInTranslationUnit(Range.getEnd(),Range.getBegin())); in findLocalPreprocessedEntitiesInRange()
209 if (SourceMgr.isLoadedSourceLocation(Loc)) in findBeginLocalPreprocessedEntity()
226 if (SourceMgr.isBeforeInTranslationUnit((*I)->getSourceRange().getEnd(), in findBeginLocalPreprocessedEntity()
240 if (SourceMgr.isLoadedSourceLocation(Loc)) in findEndLocalPreprocessedEntity()
[all …]
H A DModuleMap.cpp182 expectedToOptional(SourceMgr.getFileManager().getFileRef(Filename)); in findHeader()
341 auto File = SourceMgr.getFileManager().getOptionalFileRef(Path); in resolveAsBuiltinHeader()
351 ModuleMap::ModuleMap(SourceManager &SourceMgr, DiagnosticsEngine &Diags, in ModuleMap() argument
354 : SourceMgr(SourceMgr), Diags(Diags), LangOpts(LangOpts), Target(Target), in ModuleMap()
437 StringRef DirName = SourceMgr.getFileManager().getCanonicalName(*Dir); in findHeaderInUmbrellaDirs()
454 Dir = SourceMgr.getFileManager().getOptionalDirectoryRef(DirName); in findHeaderInUmbrellaDirs()
806 Dir = SourceMgr.getFileManager().getOptionalDirectoryRef(DirName); in isHeaderUnavailableInModule()
946 auto MainFile = SourceMgr.getFileEntryRefForID(SourceMgr.getMainFileID()); in createModuleForInterfaceUnit()
971 assert(SourceMgr.getFileEntryForID(SourceMgr.getMainFileID()) && in createModuleForImplementationUnit()
1018 SourceMgr.getFileManager().getCanonicalName(FrameworkDir); in inferFrameworkModule()
[all …]
/freebsd/contrib/llvm-project/clang/lib/Edit/
H A DEditedSource.cpp35 assert(SourceMgr.isMacroArgExpansion(Loc)); in deconstructMacroArgLoc()
37 SourceMgr.getImmediateExpansionRange(Loc).getBegin(); in deconstructMacroArgLoc()
39 SourceMgr.getImmediateExpansionRange(DefArgLoc).getBegin(); in deconstructMacroArgLoc()
41 while (SourceMgr.isMacroBodyExpansion(ExpansionLoc)) in deconstructMacroArgLoc()
43 SourceMgr.getImmediateExpansionRange(ExpansionLoc).getBegin(); in deconstructMacroArgLoc()
45 StringRef ArgName = Lexer::getSpelling(SourceMgr.getSpellingLoc(DefArgLoc), in deconstructMacroArgLoc()
46 Buf, SourceMgr, LangOpts); in deconstructMacroArgLoc()
50 SourceMgr.getSpellingLoc(DefArgLoc)}; in deconstructMacroArgLoc()
79 if (SourceMgr.isMacroArgExpansion(OrigLoc)) { in canInsertInOffset()
117 if (SourceMgr.isMacroArgExpansion(OrigLoc)) { in commitInsert()
[all …]
H A DCommit.cpp43 : SourceMgr(Editor.getSourceManager()), LangOpts(Editor.getLangOpts()), in Commit()
231 const SourceManager &SM = SourceMgr; in canInsert()
254 SourceLocation spellLoc = SourceMgr.getSpellingLoc(loc); in canInsertAfterToken()
255 unsigned tokLen = Lexer::MeasureTokenLength(spellLoc, SourceMgr, LangOpts); in canInsertAfterToken()
261 const SourceManager &SM = SourceMgr; in canInsertAfterToken()
271 loc = Lexer::getLocForEndOfToken(loc, 0, SourceMgr, LangOpts); in canInsertAfterToken()
297 const SourceManager &SM = SourceMgr; in canRemoveRange()
331 StringRef file = SourceMgr.getBufferData(Offs.getFID(), &invalidTemp); in canReplaceText()
341 return Lexer::isAtStartOfMacroExpansion(loc, SourceMgr, LangOpts, MacroBegin); in isAtStartOfMacroExpansion()
346 return Lexer::isAtEndOfMacroExpansion(loc, SourceMgr, LangOpts, MacroEnd); in isAtEndOfMacroExpansion()
/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/Tooling/Refactoring/Rename/
H A DUSRFindingAction.cpp228 bool FindSymbol(ASTContext &Context, const SourceManager &SourceMgr, in FindSymbol() argument
231 const FileID MainFileID = SourceMgr.getMainFileID(); in FindSymbol()
233 if (SymbolOffset >= SourceMgr.getFileIDSize(MainFileID)) { in FindSymbol()
239 << SourceMgr.getFileEntryRefForID(MainFileID)->getName() in FindSymbol()
244 const SourceLocation Point = SourceMgr.getLocForStartOfFile(MainFileID) in FindSymbol()
252 FullSourceLoc FullLoc(Point, SourceMgr); in FindSymbol()
282 const SourceManager &SourceMgr = Context.getSourceManager(); in HandleTranslationUnit() local
284 if (!FindSymbol(Context, SourceMgr, Offset, "")) in HandleTranslationUnit()
288 if (!FindSymbol(Context, SourceMgr, 0, QualifiedName)) in HandleTranslationUnit()

12345678