Home
last modified time | relevance | path

Searched refs:SrcMgr (Results 1 – 25 of 164) sorted by relevance

1234567

/llvm-project-15.0.7/clang/lib/Basic/
H A DSourceLocation.cpp161 return SrcMgr->getFileID(*this); in getFileID()
166 return FullSourceLoc(SrcMgr->getExpansionLoc(*this), *SrcMgr); in getExpansionLoc()
171 return FullSourceLoc(SrcMgr->getSpellingLoc(*this), *SrcMgr); in getSpellingLoc()
176 return FullSourceLoc(SrcMgr->getFileLoc(*this), *SrcMgr); in getFileLoc()
193 return FullSourceLoc(SrcMgr->getImmediateMacroCallerLoc(*this), *SrcMgr); in getImmediateMacroCallerLoc()
201 SrcMgr->getModuleImportLoc(*this); in getModuleImportLoc()
208 return SrcMgr->getFileOffset(*this); in getFileOffset()
248 return SrcMgr->isInSystemHeader(*this); in isInSystemHeader()
257 SourceLocation::dump(*SrcMgr); in dump()
267 return SrcMgr->getBufferData(SrcMgr->getFileID(*this), Invalid); in getBufferData()
[all …]
H A DSourceManager.cpp46 using namespace SrcMgr;
283 const SrcMgr::FileInfo &FileInfo = Entry.getFile(); in AddLineNote()
445 SrcMgr::C_User, ""))); in loadSLocEntry()
793 const SrcMgr::SLocEntry *I; in getFileIDLocal()
882 const SrcMgr::SLocEntry &E = getLoadedSLocEntry(I); in getFileIDLoaded()
1084 const SrcMgr::ExpansionInfo &ExpInfo = in isAtStartOfImmediateMacroExpansion()
1120 const SrcMgr::ExpansionInfo &ExpInfo = in isAtEndOfImmediateMacroExpansion()
1466 SrcMgr::CharacteristicKind
1474 const SrcMgr::FileInfo &FI = SEntry->getFile(); in getFileCharacteristic()
1525 const SrcMgr::FileInfo &FI = Entry.getFile(); in getPresumedLoc()
[all …]
/llvm-project-15.0.7/llvm/lib/TableGen/
H A DParser.cpp21 SrcMgr = SourceMgr(); in TableGenParseFile()
22 SrcMgr.takeSourceBuffersFrom(InputSrcMgr); in TableGenParseFile()
23 SrcMgr.setIncludeDirs(InputSrcMgr.getIncludeDirs()); in TableGenParseFile()
24 SrcMgr.setDiagHandler(InputSrcMgr.getDiagHandler(), in TableGenParseFile()
28 auto *MainFileBuffer = SrcMgr.getMemoryBuffer(SrcMgr.getMainFileID()); in TableGenParseFile()
31 TGParser Parser(SrcMgr, /*Macros=*/None, Records); in TableGenParseFile()
36 InputSrcMgr.takeSourceBuffersFrom(SrcMgr); in TableGenParseFile()
37 SrcMgr = SourceMgr(); in TableGenParseFile()
H A DError.cpp24 SourceMgr SrcMgr; variable
37 SrcMgr.PrintMessage(Loc.front(), Kind, Msg); in PrintMessage()
39 SrcMgr.PrintMessage(Loc[i], SourceMgr::DK_Note, in PrintMessage()
96 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Warning, Msg); in PrintWarning()
108 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Error, Msg); in PrintError()
H A DDetailedRecordsBackend.cpp91 SrcMgr.getFormattedLocationNoOffset(Class->getLoc().front())); in printClasses()
108 SrcMgr.getFormattedLocationNoOffset(Rec->getLoc().front())); in printRecords()
131 OS << formatv(" |{0}|", SrcMgr.getFormattedLocationNoOffset(LocList[I])); in printDefms()
151 OS << formatv(" |{0}|", SrcMgr.getFormattedLocationNoOffset(Value->getLoc())); in printTemplateArgs()
190 SrcMgr.getFormattedLocationNoOffset(Value.getLoc())); in printFields()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/
H A DNoLintDirectiveHandler.cpp232 const SourceManager &SrcMgr,
262 const SourceManager &SrcMgr = Diag.getSourceManager(); in diagHasNoLintInMacro() local
269 DiagLoc = SrcMgr.getImmediateExpansionRange(DiagLoc).getBegin(); in diagHasNoLintInMacro()
310 return AllowIO ? SrcMgr.getBufferDataOrNone(File) in getBuffer()
311 : SrcMgr.getBufferDataIfLoaded(File); in getBuffer()
325 std::tie(File, Pos) = SrcMgr.getDecomposedSpellingLoc(DiagLoc); in diagHasNoLint()
334 Optional<StringRef> Buffer = getBuffer(SrcMgr, File, AllowIO); in diagHasNoLint()
357 generateCache(SrcMgr, *FileName, File, *Buffer, NoLintErrors); in diagHasNoLint()
376 SourceLocation Loc = SrcMgr.getComposedLoc(File, NoLint.Pos); in makeNoLintError()
377 Error.Message = tooling::DiagnosticMessage(Message, SrcMgr, Loc); in makeNoLintError()
[all …]
/llvm-project-15.0.7/clang/unittests/Frontend/
H A DTextDiagnosticTest.cpp44 SourceManager SrcMgr(DiagEngine, FileMgr); in TEST() local
58 SrcMgr.overrideFileContents(fe, std::move(file_contents)); in TEST()
62 SrcMgr.createFileID(fe, SourceLocation(), clang::SrcMgr::C_User); in TEST()
63 SrcMgr.setMainFileID(fid); in TEST()
66 FullSourceLoc Loc(SrcMgr.translateLineCol(fid, /*Line=*/1, /*Col=*/2), in TEST()
67 SrcMgr); in TEST()
/llvm-project-15.0.7/clang/include/clang/Basic/
H A DSourceManager.h70 namespace SrcMgr {
679 std::vector<SrcMgr::ContentCache*> MemBufferInfos;
685 SmallVector<SrcMgr::SLocEntry, 0> LocalSLocEntryTable;
691 SmallVector<SrcMgr::SLocEntry, 0> LoadedSLocEntryTable;
885 SrcMgr::CharacteristicKind FileCharacter = SrcMgr::C_User,
894 SrcMgr::CharacteristicKind FileCharacter = SrcMgr::C_User,
1713 const SrcMgr::SLocEntry &getSLocEntry(FileID FID,
1804 const SrcMgr::SLocEntry &getSLocEntryByID(int ID,
1812 const SrcMgr::SLocEntry &
1828 const SrcMgr::SLocEntry &Entry = getSLocEntry(FID); in isOffsetInFileID()
[all …]
H A DSourceLocation.h369 const SourceManager *SrcMgr = nullptr;
376 : SourceLocation(Loc), SrcMgr(&SM) {}
379 bool hasManager() const { return SrcMgr != nullptr; }
383 assert(SrcMgr && "SourceManager is NULL.");
384 return *SrcMgr;
433 assert(SrcMgr == Loc.SrcMgr && "Loc comes from another SourceManager!");
452 LHS.SrcMgr == RHS.SrcMgr;
/llvm-project-15.0.7/clang-tools-extra/clangd/refactor/tweaks/
H A DSwapIfBranches.cpp66 auto &SrcMgr = Inputs.AST->getSourceManager(); in apply() local
68 auto ThenRng = toHalfOpenFileRange(SrcMgr, Ctx.getLangOpts(), in apply()
72 auto ElseRng = toHalfOpenFileRange(SrcMgr, Ctx.getLangOpts(), in apply()
77 auto ThenCode = toSourceCode(SrcMgr, *ThenRng); in apply()
78 auto ElseCode = toSourceCode(SrcMgr, *ElseRng); in apply()
89 return Effect::mainFileEdit(SrcMgr, std::move(Result)); in apply()
/llvm-project-15.0.7/llvm/unittests/TableGen/
H A DCodeExpanderTest.cpp22 SrcMgr.AddNewSourceBuffer(std::move(Buffer), SMLoc()); in bufferize()
34 SrcMgr.setDiagHandler(handler, this); in RAIIDiagnosticChecker()
37 SrcMgr.setDiagHandler(nullptr); in ~RAIIDiagnosticChecker()
63 SrcMgr.setDiagHandler(nullptr); in handler()
64 SrcMgr.PrintMessage(Self->OS, D); in handler()
65 SrcMgr.setDiagHandler(handler, Context); in handler()
116 SrcMgr, SMLoc::getFromPointer(In.data()), "TestBuffer", 1, 0, in TEST()
164 SMDiagnostic(SrcMgr, SMLoc(), "<unknown>", 0, -1, SourceMgr::DK_Error, in TEST()
180 DiagChecker.expect(SMDiagnostic(SrcMgr, SMLoc::getFromPointer(In.data()), in TEST()
H A DParserEntryPointTest.cpp28 SourceMgr SrcMgr; in TEST() local
29 SrcMgr.AddNewSourceBuffer( in TEST()
33 bool ProcessResult = TableGenParseFile(SrcMgr, Records); in TEST()
/llvm-project-15.0.7/clang/unittests/Basic/
H A DSourceManagerTest.cpp76 SourceMgr.getOrCreateFileID(BuiltInFile, SrcMgr::C_User); in TEST_F()
279 ASSERT_EQ(StringRef(SrcMgr::ContentCache::getInvalidBOM( in TEST_F()
282 ASSERT_EQ(StringRef(SrcMgr::ContentCache::getInvalidBOM( in TEST_F()
285 ASSERT_EQ(StringRef(SrcMgr::ContentCache::getInvalidBOM( in TEST_F()
288 ASSERT_EQ(StringRef(SrcMgr::ContentCache::getInvalidBOM( in TEST_F()
291 ASSERT_EQ(StringRef(SrcMgr::ContentCache::getInvalidBOM( in TEST_F()
294 ASSERT_EQ(StringRef(SrcMgr::ContentCache::getInvalidBOM( in TEST_F()
297 ASSERT_EQ(StringRef(SrcMgr::ContentCache::getInvalidBOM( in TEST_F()
300 ASSERT_EQ(StringRef(SrcMgr::ContentCache::getInvalidBOM( in TEST_F()
303 ASSERT_EQ(StringRef(SrcMgr::ContentCache::getInvalidBOM( in TEST_F()
[all …]
/llvm-project-15.0.7/clang/lib/Frontend/Rewrite/
H A DInclusionRewriter.cpp32 SrcMgr::CharacteristicKind FileType;
33 IncludedFile(FileID Id, SrcMgr::CharacteristicKind FileType) in IncludedFile()
57 void Process(FileID FileId, SrcMgr::CharacteristicKind FileType);
69 SrcMgr::CharacteristicKind FileType,
72 SrcMgr::CharacteristicKind FileType) override;
78 SrcMgr::CharacteristicKind FileType) override;
84 SrcMgr::CharacteristicKind FileType,
131 if (FileType == SrcMgr::C_System) in WriteLineInfo()
135 else if (FileType == SrcMgr::C_ExternCSystem) in WriteLineInfo()
540 Rewrite->Process(PP.getPredefinesFileID(), SrcMgr::C_User); in RewriteIncludesInInput()
[all …]
/llvm-project-15.0.7/libc/utils/HdrGen/
H A DGenerator.cpp72 llvm::SourceMgr SrcMgr; in generate() local
73 unsigned DefFileID = SrcMgr.AddNewSourceBuffer( in generate()
76 llvm::StringRef Content = SrcMgr.getMemoryBuffer(DefFileID)->getBuffer(); in generate()
87 SrcMgr.PrintMessage(llvm::SMLoc::getFromPointer(P.second.data()), in generate()
96 SrcMgr.PrintMessage(llvm::SMLoc::getFromPointer(CommandName.data()), in generate()
107 llvm::SMLoc::getFromPointer(CommandName.data()), SrcMgr); in generate()
H A DCommand.h34 const llvm::SourceMgr &SrcMgr; variable
37 ErrorReporter(llvm::SMLoc L, llvm::SourceMgr &SM) : Loc(L), SrcMgr(SM) {} in ErrorReporter()
40 SrcMgr.PrintMessage(Loc, llvm::SourceMgr::DK_Error, Msg); in printFatalError()
/llvm-project-15.0.7/clang/include/clang/Lex/
H A DDirectoryLookup.h68 DirectoryLookup(DirectoryEntryRef Dir, SrcMgr::CharacteristicKind DT, in DirectoryLookup()
75 DirectoryLookup(const HeaderMap *Map, SrcMgr::CharacteristicKind DT, in DirectoryLookup()
136 SrcMgr::CharacteristicKind getDirCharacteristic() const { in getDirCharacteristic()
137 return (SrcMgr::CharacteristicKind)DirCharacteristic; in getDirCharacteristic()
142 return getDirCharacteristic() != SrcMgr::C_User; in isSystemHeaderDirectory()
/llvm-project-15.0.7/llvm/include/llvm/MCA/
H A DCustomBehaviour.h68 const mca::SourceMgr &SrcMgr; variable
72 CustomBehaviour(const MCSubtargetInfo &STI, const mca::SourceMgr &SrcMgr, in CustomBehaviour() argument
74 : STI(STI), SrcMgr(SrcMgr), MCII(MCII) {} in CustomBehaviour()
/llvm-project-15.0.7/llvm/lib/MCA/
H A DContext.cpp32 Context::createDefaultPipeline(const PipelineOptions &Opts, SourceMgr &SrcMgr, in createDefaultPipeline() argument
37 return createInOrderPipeline(Opts, SrcMgr, CB); in createDefaultPipeline()
47 auto Fetch = std::make_unique<EntryStage>(SrcMgr); in createDefaultPipeline()
73 Context::createInOrderPipeline(const PipelineOptions &Opts, SourceMgr &SrcMgr, in createInOrderPipeline() argument
81 auto Entry = std::make_unique<EntryStage>(SrcMgr); in createInOrderPipeline()
/llvm-project-15.0.7/llvm/tools/llvm-ml/
H A Dllvm-ml.cpp111 static int AsLexInput(SourceMgr &SrcMgr, MCAsmInfo &MAI, raw_ostream &OS) { in AsLexInput() argument
113 Lexer.setBuffer(SrcMgr.getMemoryBuffer(SrcMgr.getMainFileID())->getBuffer()); in AsLexInput()
131 SourceMgr &SrcMgr, MCContext &Ctx, MCStreamer &Str, in AssembleInput() argument
159 createMCMasmParser(SrcMgr, Ctx, Str, MAI, TM, 0)); in AssembleInput()
296 SourceMgr SrcMgr; in main() local
299 SrcMgr.AddNewSourceBuffer(std::move(*BufferPtr), SMLoc()); in main()
316 SrcMgr.setIncludeDirs(IncludeDirs); in main()
333 MCContext Ctx(TheTriple, MAI.get(), MRI.get(), STI.get(), &SrcMgr); in main()
442 Res = AsLexInput(SrcMgr, *MAI, Out->os()); in main()
444 Res = AssembleInput(ProgName, TheTarget, SrcMgr, Ctx, *Str, *MAI, *STI, in main()
/llvm-project-15.0.7/llvm/tools/llvm-mc-assemble-fuzzer/
H A Dllvm-mc-assemble-fuzzer.cpp109 SourceMgr &SrcMgr, MCContext &Ctx, MCStreamer &Str, in AssembleInput() argument
115 createMCAsmParser(SrcMgr, Ctx, Str, MAI)); in AssembleInput()
140 SourceMgr SrcMgr; in AssembleOneInput() local
145 SrcMgr.AddNewSourceBuffer(std::move(BufferPtr), SMLoc()); in AssembleOneInput()
148 SrcMgr.setIncludeDirs(NoIncludeDirs); in AssembleOneInput()
178 MCContext Ctx(TheTriple, MAI.get(), MRI.get(), STI.get(), &SrcMgr); in AssembleOneInput()
240 const int Res = AssembleInput(ProgName, TheTarget, SrcMgr, Ctx, *Str, *MAI, *STI, in AssembleOneInput()
/llvm-project-15.0.7/llvm/tools/llvm-mc/
H A Dllvm-mc.cpp282 static int AsLexInput(SourceMgr &SrcMgr, MCAsmInfo &MAI, in AsLexInput() argument
286 Lexer.setBuffer(SrcMgr.getMemoryBuffer(SrcMgr.getMainFileID())->getBuffer()); in AsLexInput()
321 SourceMgr &SrcMgr, MCContext &Ctx, MCStreamer &Str, in AssembleInput() argument
325 createMCAsmParser(SrcMgr, Ctx, Str, MAI)); in AssembleInput()
385 SourceMgr SrcMgr; in main() local
388 SrcMgr.AddNewSourceBuffer(std::move(*BufferPtr), SMLoc()); in main()
392 SrcMgr.setIncludeDirs(IncludeDirs); in main()
428 MCContext Ctx(TheTriple, MAI.get(), MRI.get(), STI.get(), &SrcMgr, in main()
582 Res = AsLexInput(SrcMgr, *MAI, Out->os()); in main()
585 Res = AssembleInput(ProgName, TheTarget, SrcMgr, Ctx, *Str, *MAI, *STI, in main()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/
H A DDuplicateIncludeCheck.cpp45 SrcMgr::CharacteristicKind FileType,
53 SrcMgr::CharacteristicKind FileType) override;
70 SrcMgr::CharacteristicKind FileType, in FileChanged()
82 SrcMgr::CharacteristicKind FileType) { in InclusionDirective()
/llvm-project-15.0.7/llvm/lib/Target/AMDGPU/MCA/
H A DAMDGPUCustomBehaviour.cpp61 const mca::SourceMgr &SrcMgr, in AMDGPUCustomBehaviour() argument
63 : CustomBehaviour(STI, SrcMgr, MCII) { in AMDGPUCustomBehaviour()
125 const unsigned PrevInstIndex = PrevIR.getSourceIndex() % SrcMgr.size(); in handleWaitCnt()
240 InstrWaitCntInfo.resize(SrcMgr.size()); in generateWaitCntInfo()
242 for (const auto &EN : llvm::enumerate(SrcMgr.getInstructions())) { in generateWaitCntInfo()
337 const mca::SourceMgr &SrcMgr, in createAMDGPUCustomBehaviour() argument
339 return new AMDGPUCustomBehaviour(STI, SrcMgr, MCII); in createAMDGPUCustomBehaviour()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/llvmlibc/
H A DRestrictSystemLibcHeadersCheck.cpp39 SrcMgr::CharacteristicKind FileType) override;
51 SrcMgr::CharacteristicKind FileType) { in InclusionDirective()
53 if (SrcMgr::isSystem(FileType) && SearchPath == CompilerIncudeDir) in InclusionDirective()

1234567