Home
last modified time | relevance | path

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

12345678910

/external/llvm-project/clang/lib/Basic/
DSourceLocation.cpp153 return SrcMgr->getFileID(*this); in getFileID()
158 return FullSourceLoc(SrcMgr->getExpansionLoc(*this), *SrcMgr); in getExpansionLoc()
163 return FullSourceLoc(SrcMgr->getSpellingLoc(*this), *SrcMgr); in getSpellingLoc()
168 return FullSourceLoc(SrcMgr->getFileLoc(*this), *SrcMgr); in getFileLoc()
175 return SrcMgr->getPresumedLoc(*this, UseLineDirectives); in getPresumedLoc()
180 return SrcMgr->isMacroArgExpansion(*this, StartLoc); in isMacroArgExpansion()
185 return FullSourceLoc(SrcMgr->getImmediateMacroCallerLoc(*this), *SrcMgr); in getImmediateMacroCallerLoc()
193 SrcMgr->getModuleImportLoc(*this); in getModuleImportLoc()
194 return std::make_pair(FullSourceLoc(ImportLoc.first, *SrcMgr), in getModuleImportLoc()
200 return SrcMgr->getFileOffset(*this); in getFileOffset()
[all …]
DSourceManager.cpp45 using namespace SrcMgr;
201 SrcMgr::CharacteristicKind FileKind) { in AddLineNote()
269 SrcMgr::CharacteristicKind FileKind) { in AddLineNote()
277 const SrcMgr::FileInfo &FileInfo = Entry.getFile(); in AddLineNote()
280 const_cast<SrcMgr::FileInfo&>(FileInfo).setHasLineDirectives(); in AddLineNote()
321 for (llvm::DenseMap<const FileEntry*, SrcMgr::ContentCache*>::iterator in ~SourceManager()
376 SrcMgr::ContentCache *&Slot = FileInfos[FileInfo.first]; in initializeForReplay()
428 const SrcMgr::SLocEntry &SourceManager::loadSLocEntry(unsigned Index, in loadSLocEntry()
440 SrcMgr::C_User, ""))); in loadSLocEntry()
474 SrcMgr::ContentCache &SourceManager::getFakeContentCacheForRecovery() const { in getFakeContentCacheForRecovery()
[all …]
/external/clang/lib/Basic/
DSourceLocation.cpp82 return SrcMgr->getFileID(*this); in getFileID()
88 return FullSourceLoc(SrcMgr->getExpansionLoc(*this), *SrcMgr); in getExpansionLoc()
93 return FullSourceLoc(SrcMgr->getSpellingLoc(*this), *SrcMgr); in getSpellingLoc()
98 return SrcMgr->getExpansionLineNumber(*this, Invalid); in getExpansionLineNumber()
103 return SrcMgr->getExpansionColumnNumber(*this, Invalid); in getExpansionColumnNumber()
108 return SrcMgr->getSpellingLineNumber(*this, Invalid); in getSpellingLineNumber()
113 return SrcMgr->getSpellingColumnNumber(*this, Invalid); in getSpellingColumnNumber()
118 return SrcMgr->isInSystemHeader(*this); in isInSystemHeader()
123 return SrcMgr->isBeforeInTranslationUnit(*this, Loc); in isBeforeInTranslationUnitThan()
127 SourceLocation::dump(*SrcMgr); in dump()
[all …]
DSourceManager.cpp31 using namespace SrcMgr;
197 SrcMgr::CharacteristicKind Kind = SrcMgr::C_User; in AddLineNote()
224 SrcMgr::CharacteristicKind FileKind) { in AddLineNote()
298 const SrcMgr::FileInfo &FileInfo = Entry.getFile(); in AddLineNote()
301 const_cast<SrcMgr::FileInfo&>(FileInfo).setHasLineDirectives(); in AddLineNote()
326 const SrcMgr::FileInfo &FileInfo = Entry.getFile(); in AddLineNote()
329 const_cast<SrcMgr::FileInfo&>(FileInfo).setHasLineDirectives(); in AddLineNote()
333 SrcMgr::CharacteristicKind FileKind; in AddLineNote()
335 FileKind = SrcMgr::C_ExternCSystem; in AddLineNote()
337 FileKind = SrcMgr::C_System; in AddLineNote()
[all …]
/external/clang/include/clang/Basic/
DSourceManager.h70 namespace SrcMgr {
563 llvm::DenseMap<const FileEntry*, SrcMgr::ContentCache*> FileInfos;
600 std::vector<SrcMgr::ContentCache*> MemBufferInfos;
606 SmallVector<SrcMgr::SLocEntry, 0> LocalSLocEntryTable;
612 mutable SmallVector<SrcMgr::SLocEntry, 0> LoadedSLocEntryTable;
652 mutable SrcMgr::ContentCache *LastLineNoContentCache;
691 mutable std::unique_ptr<SrcMgr::ContentCache> FakeContentCacheForRecovery;
779 SrcMgr::CharacteristicKind FileCharacter,
781 const SrcMgr::ContentCache *
783 /*isSystemFile=*/FileCharacter != SrcMgr::C_User);
[all …]
DSourceLocation.h269 const SourceManager *SrcMgr; variable
272 explicit FullSourceLoc() : SrcMgr(nullptr) {} in FullSourceLoc()
275 : SourceLocation(Loc), SrcMgr(&SM) {} in FullSourceLoc()
279 assert(SrcMgr && "SourceManager is NULL."); in getManager()
280 return *SrcMgr; in getManager()
319 assert(SrcMgr == Loc.SrcMgr && "Loc comes from another SourceManager!"); in isBeforeInTranslationUnitThan()
339 LHS.SrcMgr == RHS.SrcMgr;
/external/llvm-project/clang/unittests/Frontend/
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()
/external/llvm-project/clang/include/clang/Basic/
DSourceManager.h69 namespace SrcMgr {
641 llvm::DenseMap<const FileEntry*, SrcMgr::ContentCache*> FileInfos;
679 std::vector<SrcMgr::ContentCache*> MemBufferInfos;
685 SmallVector<SrcMgr::SLocEntry, 0> LocalSLocEntryTable;
691 SmallVector<SrcMgr::SLocEntry, 0> LoadedSLocEntryTable;
731 mutable const SrcMgr::ContentCache *LastLineNoContentCache;
771 mutable std::unique_ptr<SrcMgr::ContentCache> FakeContentCacheForRecovery;
773 mutable std::unique_ptr<SrcMgr::SLocEntry> FakeSLocEntryForRecovery;
870 SrcMgr::CharacteristicKind FileCharacter,
874 SrcMgr::CharacteristicKind FileCharacter,
[all …]
/external/llvm-project/clang-tools-extra/clangd/refactor/tweaks/
DSwapIfBranches.cpp69 auto &SrcMgr = Inputs.AST->getSourceManager(); in apply() local
71 auto ThenRng = toHalfOpenFileRange(SrcMgr, Ctx.getLangOpts(), in apply()
75 auto ElseRng = toHalfOpenFileRange(SrcMgr, Ctx.getLangOpts(), in apply()
80 auto ThenCode = toSourceCode(SrcMgr, *ThenRng); in apply()
81 auto ElseCode = toSourceCode(SrcMgr, *ElseRng); in apply()
92 return Effect::mainFileEdit(SrcMgr, std::move(Result)); in apply()
/external/llvm-project/llvm/unittests/TableGen/
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()
/external/llvm/lib/TableGen/
DError.cpp23 SourceMgr SrcMgr; variable
36 SrcMgr.PrintMessage(Loc.front(), Kind, Msg); in PrintMessage()
38 SrcMgr.PrintMessage(Loc[i], SourceMgr::DK_Note, in PrintMessage()
47 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Warning, Msg); in PrintWarning()
59 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Error, Msg); in PrintError()
DTGLexer.cpp29 TGLexer::TGLexer(SourceMgr &SM) : SrcMgr(SM) { in TGLexer()
30 CurBuffer = SrcMgr.getMainFileID(); in TGLexer()
31 CurBuf = SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer(); in TGLexer()
60 SMLoc ParentIncludeLoc = SrcMgr.getParentIncludeLoc(CurBuffer); in getNextChar()
62 CurBuffer = SrcMgr.FindBufferContainingLoc(ParentIncludeLoc); in getNextChar()
63 CurBuf = SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer(); in getNextChar()
305 CurBuffer = SrcMgr.AddIncludeFile(Filename, SMLoc::getFromPointer(CurPtr), in LexInclude()
316 SrcMgr.PrintMessage(Found->second, SourceMgr::DK_Note, in LexInclude()
322 CurBuf = SrcMgr.getMemoryBuffer(CurBuffer)->getBuffer(); in LexInclude()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/TableGen/
DError.cpp23 SourceMgr SrcMgr; variable
36 SrcMgr.PrintMessage(Loc.front(), Kind, Msg); in PrintMessage()
38 SrcMgr.PrintMessage(Loc[i], SourceMgr::DK_Note, in PrintMessage()
53 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Warning, Msg); in PrintWarning()
63 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Error, Msg); in PrintError()
/external/llvm-project/clang/unittests/Basic/
DSourceManagerTest.cpp178 FileID MainFileID = SourceMgr.getOrCreateFileID(SourceFile, SrcMgr::C_User); in TEST_F()
179 FileID HeaderFileID = SourceMgr.getOrCreateFileID(HeaderFile, SrcMgr::C_User); in TEST_F()
206 ASSERT_EQ(SrcMgr::ContentCache::getInvalidBOM(""), nullptr); in TEST_F()
207 ASSERT_EQ(SrcMgr::ContentCache::getInvalidBOM("\x00\x00\x00"), nullptr); in TEST_F()
208 ASSERT_EQ(SrcMgr::ContentCache::getInvalidBOM("\xFF\xFF\xFF"), nullptr); in TEST_F()
209 ASSERT_EQ(SrcMgr::ContentCache::getInvalidBOM("#include <iostream>"), in TEST_F()
212 ASSERT_EQ(StringRef(SrcMgr::ContentCache::getInvalidBOM( in TEST_F()
215 ASSERT_EQ(StringRef(SrcMgr::ContentCache::getInvalidBOM( in TEST_F()
218 ASSERT_EQ(StringRef(SrcMgr::ContentCache::getInvalidBOM( in TEST_F()
221 ASSERT_EQ(StringRef(SrcMgr::ContentCache::getInvalidBOM( in TEST_F()
[all …]
/external/llvm-project/clang/lib/Frontend/Rewrite/
DInclusionRewriter.cpp33 SrcMgr::CharacteristicKind FileType;
35 IncludedFile(FileID Id, SrcMgr::CharacteristicKind FileType, in IncludedFile()
60 void Process(FileID FileId, SrcMgr::CharacteristicKind FileType,
73 SrcMgr::CharacteristicKind FileType,
76 SrcMgr::CharacteristicKind FileType) override;
82 SrcMgr::CharacteristicKind FileType) override;
88 SrcMgr::CharacteristicKind FileType,
119 SrcMgr::CharacteristicKind FileType, in WriteLineInfo()
135 if (FileType == SrcMgr::C_System) in WriteLineInfo()
139 else if (FileType == SrcMgr::C_ExternCSystem) in WriteLineInfo()
[all …]
/external/clang/include/clang/Lex/
DDirectoryLookup.h68 DirectoryLookup(const DirectoryEntry *dir, SrcMgr::CharacteristicKind DT, in DirectoryLookup()
78 DirectoryLookup(const HeaderMap *map, SrcMgr::CharacteristicKind DT, in DirectoryLookup()
133 SrcMgr::CharacteristicKind getDirCharacteristic() const { in getDirCharacteristic()
134 return (SrcMgr::CharacteristicKind)DirCharacteristic; in getDirCharacteristic()
139 return getDirCharacteristic() != SrcMgr::C_User; in isSystemHeaderDirectory()
/external/llvm-project/libc/utils/HdrGen/
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()
/external/llvm-project/clang/include/clang/Lex/
DDirectoryLookup.h68 DirectoryLookup(DirectoryEntryRef Dir, SrcMgr::CharacteristicKind DT, in DirectoryLookup()
75 DirectoryLookup(const HeaderMap *Map, SrcMgr::CharacteristicKind DT, in DirectoryLookup()
132 SrcMgr::CharacteristicKind getDirCharacteristic() const { in getDirCharacteristic()
133 return (SrcMgr::CharacteristicKind)DirCharacteristic; in getDirCharacteristic()
138 return getDirCharacteristic() != SrcMgr::C_User; in isSystemHeaderDirectory()
/external/llvm-project/llvm/tools/llvm-ml/
Dllvm-ml.cpp108 static int AsLexInput(SourceMgr &SrcMgr, MCAsmInfo &MAI, raw_ostream &OS) { in AsLexInput() argument
110 Lexer.setBuffer(SrcMgr.getMemoryBuffer(SrcMgr.getMainFileID())->getBuffer()); in AsLexInput()
128 SourceMgr &SrcMgr, MCContext &Ctx, MCStreamer &Str, in AssembleInput() argument
133 createMCMasmParser(SrcMgr, Ctx, Str, MAI, 0)); in AssembleInput()
259 SourceMgr SrcMgr; in main() local
262 SrcMgr.AddNewSourceBuffer(std::move(*BufferPtr), SMLoc()); in main()
266 SrcMgr.setIncludeDirs(InputArgs.getAllArgValues(OPT_include_path)); in main()
280 MCContext Ctx(MAI.get(), MRI.get(), &MOFI, &SrcMgr); in main()
392 Res = AsLexInput(SrcMgr, *MAI, Out->os()); in main()
394 Res = AssembleInput(ProgName, TheTarget, SrcMgr, Ctx, *Str, *MAI, *STI, in main()
/external/llvm/tools/llvm-mcmarkup/
Dllvm-mcmarkup.cpp73 MarkupParser(MarkupLexer &lex, SourceMgr &SrcMgr) : Lex(lex), SM(SrcMgr) {} in MarkupParser() argument
146 SourceMgr SrcMgr; in parseMCMarkup() local
151 SrcMgr.AddNewSourceBuffer(std::move(Buffer), SMLoc()); in parseMCMarkup()
154 MarkupParser Parser(Lex, SrcMgr); in parseMCMarkup()
203 SrcMgr.PrintMessage(Tag.getLoc(), SourceMgr::DK_Error, in parseMCMarkup()
/external/clang/lib/Frontend/Rewrite/
DInclusionRewriter.cpp34 SrcMgr::CharacteristicKind FileType;
35 IncludedFile(FileID Id, SrcMgr::CharacteristicKind FileType) in IncludedFile()
55 bool Process(FileID FileId, SrcMgr::CharacteristicKind FileType);
62 SrcMgr::CharacteristicKind FileType,
65 SrcMgr::CharacteristicKind FileType) override;
72 SrcMgr::CharacteristicKind FileType,
106 SrcMgr::CharacteristicKind FileType, in WriteLineInfo()
122 if (FileType == SrcMgr::C_System) in WriteLineInfo()
126 else if (FileType == SrcMgr::C_ExternCSystem) in WriteLineInfo()
143 SrcMgr::CharacteristicKind NewFileType, in FileChanged()
[all …]
/external/llvm-project/llvm/lib/TableGen/
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()
/external/llvm/tools/llvm-mc/
Dllvm-mc.cpp249 static int AsLexInput(SourceMgr &SrcMgr, MCAsmInfo &MAI, in AsLexInput() argument
253 Lexer.setBuffer(SrcMgr.getMemoryBuffer(SrcMgr.getMainFileID())->getBuffer()); in AsLexInput()
261 SrcMgr.PrintMessage(Lexer.getLoc(), SourceMgr::DK_Warning, in AsLexInput()
349 SourceMgr &SrcMgr, MCContext &Ctx, MCStreamer &Str, in AssembleInput() argument
353 createMCAsmParser(SrcMgr, Ctx, Str, MAI)); in AssembleInput()
412 SourceMgr SrcMgr; in main() local
415 SrcMgr.AddNewSourceBuffer(std::move(*BufferPtr), SMLoc()); in main()
419 SrcMgr.setIncludeDirs(IncludeDirs); in main()
442 MCContext Ctx(MAI.get(), MRI.get(), &MOFI, &SrcMgr); in main()
540 Res = AsLexInput(SrcMgr, *MAI, Out->os()); in main()
[all …]
/external/llvm-project/llvm/lib/CodeGen/AsmPrinter/
DAsmPrinterInlineAsm.cpp51 unsigned BufNum = DiagInfo->SrcMgr.FindBufferContainingLoc(Diag.getLoc()); in srcMgrDiagHandler()
79 Context.setInlineSourceManager(&DiagInfo->SrcMgr); in addInlineAsmDiagBuffer()
85 DiagInfo->SrcMgr.setDiagHandler(srcMgrDiagHandler, DiagInfo.get()); in addInlineAsmDiagBuffer()
89 SourceMgr &SrcMgr = DiagInfo->SrcMgr; in addInlineAsmDiagBuffer() local
97 unsigned BufNum = SrcMgr.AddNewSourceBuffer(std::move(Buffer), SMLoc()); in addInlineAsmDiagBuffer()
137 DiagInfo->SrcMgr.setIncludeDirs(MCOptions.IASSearchPaths); in emitInlineAsm()
140 DiagInfo->SrcMgr, OutContext, *OutStreamer, *MAI, BufNum)); in emitInlineAsm()
573 auto &SrcMgr = DiagInfo->SrcMgr; in emitInlineAsm() local
575 SrcMgr.getMemoryBuffer(BufNum)->getBuffer().begin()); in emitInlineAsm()
587 SrcMgr.PrintMessage(Loc, SourceMgr::DK_Warning, Msg); in emitInlineAsm()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/AsmPrinter/
DAsmPrinterInlineAsm.cpp50 unsigned BufNum = DiagInfo->SrcMgr.FindBufferContainingLoc(Diag.getLoc()); in srcMgrDiagHandler()
78 Context.setInlineSourceManager(&DiagInfo->SrcMgr); in addInlineAsmDiagBuffer()
84 DiagInfo->SrcMgr.setDiagHandler(srcMgrDiagHandler, DiagInfo.get()); in addInlineAsmDiagBuffer()
88 SourceMgr &SrcMgr = DiagInfo->SrcMgr; in addInlineAsmDiagBuffer() local
96 unsigned BufNum = SrcMgr.AddNewSourceBuffer(std::move(Buffer), SMLoc()); in addInlineAsmDiagBuffer()
136 DiagInfo->SrcMgr.setIncludeDirs(MCOptions.IASSearchPaths); in EmitInlineAsm()
139 DiagInfo->SrcMgr, OutContext, *OutStreamer, *MAI, BufNum)); in EmitInlineAsm()
570 auto &SrcMgr = DiagInfo->SrcMgr; in EmitInlineAsm() local
572 SrcMgr.getMemoryBuffer(BufNum)->getBuffer().begin()); in EmitInlineAsm()
583 SrcMgr.PrintMessage(Loc, SourceMgr::DK_Warning, Msg); in EmitInlineAsm()
[all …]

12345678910