/external/llvm-project/clang/lib/Basic/ |
D | SourceLocation.cpp | 153 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 …]
|
D | SourceManager.cpp | 45 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/ |
D | SourceLocation.cpp | 82 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 …]
|
D | SourceManager.cpp | 31 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/ |
D | SourceManager.h | 70 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 …]
|
D | SourceLocation.h | 269 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/ |
D | TextDiagnosticTest.cpp | 44 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/ |
D | SourceManager.h | 69 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/ |
D | SwapIfBranches.cpp | 69 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/ |
D | CodeExpanderTest.cpp | 22 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/ |
D | Error.cpp | 23 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()
|
D | TGLexer.cpp | 29 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/ |
D | Error.cpp | 23 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/ |
D | SourceManagerTest.cpp | 178 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/ |
D | InclusionRewriter.cpp | 33 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/ |
D | DirectoryLookup.h | 68 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/ |
D | Generator.cpp | 72 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/ |
D | DirectoryLookup.h | 68 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/ |
D | llvm-ml.cpp | 108 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/ |
D | llvm-mcmarkup.cpp | 73 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/ |
D | InclusionRewriter.cpp | 34 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/ |
D | Error.cpp | 24 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/ |
D | llvm-mc.cpp | 249 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/ |
D | AsmPrinterInlineAsm.cpp | 51 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/ |
D | AsmPrinterInlineAsm.cpp | 50 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 …]
|