| /freebsd-10-stable/contrib/llvm/include/llvm/Support/ |
| D | SourceMgr.h | 27 class SourceMgr; variable 35 class SourceMgr { 71 SourceMgr(const SourceMgr&) LLVM_DELETED_FUNCTION; 72 void operator=(const SourceMgr&) LLVM_DELETED_FUNCTION; 74 SourceMgr() : LineNoCache(0), DiagHandler(0), DiagContext(0) {} in SourceMgr() function 75 ~SourceMgr(); 213 const SourceMgr *SM; 217 SourceMgr::DiagKind Kind; 225 : SM(0), LineNo(0), ColumnNo(0), Kind(SourceMgr::DK_Error) {} in SMDiagnostic() 227 SMDiagnostic(StringRef filename, SourceMgr::DiagKind Knd, StringRef Msg) in SMDiagnostic() [all …]
|
| /freebsd-10-stable/contrib/llvm/lib/TableGen/ |
| D | Error.cpp | 22 SourceMgr SrcMgr; 25 static void PrintMessage(ArrayRef<SMLoc> Loc, SourceMgr::DiagKind Kind, in PrintMessage() 29 if (Kind == SourceMgr::DK_Error) in PrintMessage() 37 SrcMgr.PrintMessage(Loc[i], SourceMgr::DK_Note, in PrintMessage() 42 PrintMessage(WarningLoc, SourceMgr::DK_Warning, Msg); in PrintWarning() 46 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Warning, Msg); in PrintWarning() 54 PrintMessage(ErrorLoc, SourceMgr::DK_Error, Msg); in PrintError() 58 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Error, Msg); in PrintError()
|
| /freebsd-10-stable/contrib/llvm/tools/clang/lib/Format/ |
| D | WhitespaceManager.h | 40 WhitespaceManager(SourceManager &SourceMgr, const FormatStyle &Style, in WhitespaceManager() argument 42 : SourceMgr(SourceMgr), Style(Style), UseCRLF(UseCRLF) {} in WhitespaceManager() 85 IsBeforeInFile(const SourceManager &SourceMgr) : SourceMgr(SourceMgr) {} in IsBeforeInFile() 89 const SourceManager &SourceMgr; 174 SourceManager &SourceMgr; variable
|
| D | WhitespaceManager.cpp | 24 return SourceMgr.isBeforeInTranslationUnit( in operator ()() 93 std::sort(Changes.begin(), Changes.end(), Change::IsBeforeInFile(SourceMgr)); in generateReplacements() 106 SourceMgr.getFileOffset(Changes[i].OriginalWhitespaceRange.getBegin()); in calculateLineBreakInformation() 107 unsigned PreviousOriginalWhitespaceEnd = SourceMgr.getFileOffset( in calculateLineBreakInformation() 151 (SourceMgr.getSpellingColumnNumber( in alignTrailingComments() 153 SourceMgr.getSpellingColumnNumber( in alignTrailingComments() 254 unsigned WhitespaceLength = SourceMgr.getFileOffset(Range.getEnd()) - in storeReplacement() 255 SourceMgr.getFileOffset(Range.getBegin()); in storeReplacement() 257 if (StringRef(SourceMgr.getCharacterData(Range.getBegin()), in storeReplacement() 261 SourceMgr, CharSourceRange::getCharRange(Range), Text)); in storeReplacement()
|
| D | Format.cpp | 529 UnwrappedLineFormatter(SourceManager &SourceMgr, in UnwrappedLineFormatter() argument 534 : SourceMgr(SourceMgr), Ranges(Ranges), Indenter(Indenter), in UnwrappedLineFormatter() 775 if (!SourceMgr.isBeforeInTranslationUnit(Range.getEnd(), I->getBegin()) && in touchesRanges() 776 !SourceMgr.isBeforeInTranslationUnit(I->getEnd(), Range.getBegin())) in touchesRanges() 982 SourceManager &SourceMgr; member in clang::format::__anonbe7c64ad0111::UnwrappedLineFormatter 994 FormatTokenLexer(Lexer &Lex, SourceManager &SourceMgr, FormatStyle &Style, in FormatTokenLexer() argument 997 TrailingWhitespace(0), Lex(Lex), SourceMgr(SourceMgr), Style(Style), in FormatTokenLexer() 1186 SourceManager &SourceMgr; member in clang::format::__anonbe7c64ad0111::FormatTokenLexer 1195 Tok.TokenText = StringRef(SourceMgr.getCharacterData(Tok.Tok.getLocation()), in readRawToken() 1209 Formatter(const FormatStyle &Style, Lexer &Lex, SourceManager &SourceMgr, in Formatter() argument [all …]
|
| /freebsd-10-stable/contrib/llvm/tools/clang/lib/Lex/ |
| D | PPLexerChange.cpp | 91 SourceLocation FileStart = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile() 93 << std::string(SourceMgr.getBufferName(FileStart)) << ""; in EnterSourceFile() 98 SourceMgr.getFileEntryForID(FID) == CodeCompletionFile) { in EnterSourceFile() 99 CodeCompletionFileLoc = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFile() 126 SourceMgr.getFileCharacteristic(CurLexer->getFileLoc()); in EnterSourceFileWithLexer() 150 SourceLocation EnterLoc = SourceMgr.getLocForStartOfFile(FID); in EnterSourceFileWithPTH() 152 SourceMgr.getFileCharacteristic(EnterLoc); in EnterSourceFileWithPTH() 260 SourceMgr.getFileEntryForID(CurPPLexer->getFileID())) { in HandleEndOfFile() 316 SourceMgr.getLocForStartOfFile(CurPPLexer->getFileID()) == in HandleEndOfFile() 333 SourceMgr.getIncludeLoc(CurPPLexer->getFileID()).isValid()) { in HandleEndOfFile() [all …]
|
| D | PPConditionalDirectiveRecord.cpp | 20 : SourceMgr(SM) { in PPConditionalDirectiveRecord() 31 Range.getBegin(), CondDirectiveLoc::Comp(SourceMgr)); in rangeIntersectsConditionalDirective() 35 if (SourceMgr.isBeforeInTranslationUnit(Range.getEnd(), low->getLoc())) in rangeIntersectsConditionalDirective() 40 Range.getEnd(), CondDirectiveLoc::Comp(SourceMgr)); in rangeIntersectsConditionalDirective() 55 if (SourceMgr.isBeforeInTranslationUnit(CondDirectiveLocs.back().getLoc(), in findConditionalDirectiveRegionLoc() 61 Loc, CondDirectiveLoc::Comp(SourceMgr)); in findConditionalDirectiveRegionLoc() 69 if (SourceMgr.isInSystemHeader(DirLoc.getLoc())) in addCondDirectiveLoc() 73 SourceMgr.isBeforeInTranslationUnit(CondDirectiveLocs.back().getLoc(), in addCondDirectiveLoc()
|
| D | PreprocessingRecord.cpp | 42 : SourceMgr(SM), in PreprocessingRecord() 102 return isPreprocessedEntityIfInFileID(PPE, FID, SourceMgr); in isEntityInFileID() 115 FID, SourceMgr); in isEntityInFileID() 123 FID, SourceMgr); in isEntityInFileID() 131 assert(!SourceMgr.isBeforeInTranslationUnit(Range.getEnd(),Range.getBegin())); in getPreprocessedEntitiesInRangeSlow() 137 if (!ExternalSource || SourceMgr.isLocalSourceLocation(Range.getBegin())) in getPreprocessedEntitiesInRangeSlow() 163 assert(!SourceMgr.isBeforeInTranslationUnit(Range.getEnd(),Range.getBegin())); in findLocalPreprocessedEntitiesInRange() 204 if (SourceMgr.isLoadedSourceLocation(Loc)) in findBeginLocalPreprocessedEntity() 221 if (SourceMgr.isBeforeInTranslationUnit((*I)->getSourceRange().getEnd(), in findBeginLocalPreprocessedEntity() 235 if (SourceMgr.isLoadedSourceLocation(Loc)) in findEndLocalPreprocessedEntity() [all …]
|
| D | Preprocessor.cpp | 64 FileMgr(Headers.getFileMgr()), SourceMgr(SM), HeaderInfo(Headers), in Preprocessor() 75 ScratchBuf = new ScratchBuffer(SourceMgr); in Preprocessor() 207 const char *Start = SourceMgr.getCharacterData(Tok.getLocation()); in DumpToken() 218 Loc.dump(SourceMgr); in DumpLocation() 315 Def = I->second->findDirectiveAtLoc(Loc, SourceMgr); in getLastMacroWithSpelling() 324 SourceMgr.isBeforeInTranslationUnit(BestLocation, Location))) { in getLastMacroWithSpelling() 354 const MemoryBuffer *Buffer = SourceMgr.getMemoryBufferForFile(File, &Invalid); in SetCodeCompletionPoint() 388 SourceMgr.overrideFileContents(File, NewBuffer); in SetCodeCompletionPoint() 434 Loc = SourceMgr.createExpansionLoc(Loc, ExpansionLocStart, in CreateString() 464 FileID MainFileID = SourceMgr.getMainFileID(); in EnterMainSourceFile() [all …]
|
| D | ScratchBuffer.cpp | 24 ScratchBuffer::ScratchBuffer(SourceManager &SM) : SourceMgr(SM), CurBuffer(0) { in ScratchBuffer() 68 FileID FID = SourceMgr.createFileIDForMemBuffer(Buf); in AllocScratchBuffer() 69 BufferStartLoc = SourceMgr.getLocForStartOfFile(FID); in AllocScratchBuffer()
|
| D | ModuleMap.cpp | 86 ModuleMap::ModuleMap(SourceManager &SourceMgr, DiagnosticConsumer &DC, in ModuleMap() argument 89 : SourceMgr(SourceMgr), LangOpts(LangOpts), Target(Target), in ModuleMap() 97 Diags->setSourceManager(&SourceMgr); in ModuleMap() 225 StringRef DirName = SourceMgr.getFileManager().getCanonicalName(Dir); in findModuleForHeader() 302 Dir = SourceMgr.getFileManager().getDirectory(DirName); in findModuleForHeader() 376 Dir = SourceMgr.getFileManager().getDirectory(DirName); in isHeaderInUnavailableModule() 481 FileManager &FileMgr = SourceMgr.getFileManager(); in inferFrameworkModule() 493 = SourceMgr.getFileManager().getCanonicalName(FrameworkDir); in inferFrameworkModule() 658 return SourceMgr.getFileEntryForID( in getContainingModuleMapFile() 659 SourceMgr.getFileID(Module->DefinitionLoc)); in getContainingModuleMapFile() [all …]
|
| /freebsd-10-stable/contrib/llvm/tools/llvm-mc/ |
| D | Disassembler.cpp | 53 SourceMgr &SM, raw_ostream &Out, in PrintInsts() 71 SourceMgr::DK_Warning, in PrintInsts() 84 SourceMgr::DK_Warning, in PrintInsts() 126 SourceMgr &SM) { in ByteArrayFromString() 140 SM.PrintMessage(SMLoc::getFromPointer(Value.data()), SourceMgr::DK_Error, in ByteArrayFromString() 159 SourceMgr &SM, in disassemble() 182 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble() 191 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble() 209 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
|
| /freebsd-10-stable/contrib/llvm/lib/Support/ |
| D | SourceMgr.cpp | 41 SourceMgr::~SourceMgr() { in ~SourceMgr() 55 size_t SourceMgr::AddIncludeFile(const std::string &Filename, in AddIncludeFile() 76 int SourceMgr::FindBufferContainingLoc(SMLoc Loc) const { in FindBufferContainingLoc() 89 SourceMgr::getLineAndColumn(SMLoc Loc, int BufferID) const { in getLineAndColumn() 132 void SourceMgr::PrintIncludeStack(SMLoc IncludeLoc, raw_ostream &OS) const { in PrintIncludeStack() 151 SMDiagnostic SourceMgr::GetMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in GetMessage() 214 void SourceMgr::PrintMessage(raw_ostream &OS, SMLoc Loc, in PrintMessage() 215 SourceMgr::DiagKind Kind, in PrintMessage() 235 void SourceMgr::PrintMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in PrintMessage() 245 SMDiagnostic::SMDiagnostic(const SourceMgr &sm, SMLoc L, StringRef FN, in SMDiagnostic() [all …]
|
| /freebsd-10-stable/contrib/llvm/tools/clang/include/clang/AST/ |
| D | RawCommentList.h | 43 RawComment(const SourceManager &SourceMgr, SourceRange SR, 101 StringRef getRawText(const SourceManager &SourceMgr) const { in getRawText() argument 105 RawText = getRawTextSlow(SourceMgr); in getRawText() 156 StringRef getRawTextSlow(const SourceManager &SourceMgr) const; 184 RawCommentList(SourceManager &SourceMgr) : SourceMgr(SourceMgr) {} in RawCommentList() argument 193 SourceManager &SourceMgr;
|
| /freebsd-10-stable/contrib/llvm/tools/clang/lib/Rewrite/Core/ |
| D | Rewriter.cpp | 152 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRangeSize() 187 const char *Ptr = SourceMgr->getCharacterData(Range.getBegin()); in getRewrittenText() 191 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRewrittenText() 201 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRewrittenText() 215 std::pair<FileID,unsigned> V = SourceMgr->getDecomposedLoc(Loc); in getLocationOffsetAndFileID() 230 StringRef MB = SourceMgr->getBufferData(FID); in getEditBuffer() 246 StringRef MB = SourceMgr->getBufferData(FID); in InsertText() 248 unsigned lineNo = SourceMgr->getLineNumber(FID, StartOffs) - 1; in InsertText() 250 Content = SourceMgr->getSLocEntry(FID).getFile().getContentCache(); in InsertText() 323 StringRef MB = SourceMgr->getBufferData(FID); in ReplaceText() [all …]
|
| /freebsd-10-stable/contrib/llvm/tools/clang/lib/AST/ |
| D | RawCommentList.cpp | 67 RawComment::RawComment(const SourceManager &SourceMgr, SourceRange SR, in RawComment() argument 73 if (SR.getBegin() == SR.getEnd() || getRawText(SourceMgr).empty()) { in RawComment() 92 StringRef RawComment::getRawTextSlow(const SourceManager &SourceMgr) const { in getRawTextSlow() 99 SourceMgr.getDecomposedLoc(Range.getBegin()); in getRawTextSlow() 101 SourceMgr.getDecomposedLoc(Range.getEnd()); in getRawTextSlow() 111 const char *BufferStart = SourceMgr.getBufferData(BeginFileID, in getRawTextSlow() 221 !SourceMgr.isBeforeInTranslationUnit(Comments.back()->getLocStart(), in addComment() 246 onlyWhitespaceBetween(SourceMgr, C1.getLocEnd(), C2.getLocStart(), in addComment() 249 *Comments.back() = RawComment(SourceMgr, MergedRange, true, in addComment()
|
| /freebsd-10-stable/contrib/llvm/tools/clang/lib/Frontend/ |
| D | VerifyDiagnosticConsumer.cpp | 574 static unsigned PrintUnexpected(DiagnosticsEngine &Diags, SourceManager *SourceMgr, in PrintUnexpected() argument 583 if (I->first.isInvalid() || !SourceMgr) in PrintUnexpected() 587 if (const FileEntry *File = SourceMgr->getFileEntryForID( in PrintUnexpected() 588 SourceMgr->getFileID(I->first))) in PrintUnexpected() 590 OS << " Line " << SourceMgr->getPresumedLineNumber(I->first); in PrintUnexpected() 602 static unsigned PrintExpected(DiagnosticsEngine &Diags, SourceManager &SourceMgr, in PrintExpected() argument 611 OS << "\n File " << SourceMgr.getFilename(D.DiagnosticLoc) in PrintExpected() 612 << " Line " << SourceMgr.getPresumedLineNumber(D.DiagnosticLoc); in PrintExpected() 615 << SourceMgr.getFilename(D.DirectiveLoc) << ':' in PrintExpected() 616 << SourceMgr.getPresumedLineNumber(D.DirectiveLoc) << ')'; in PrintExpected() [all …]
|
| D | ASTUnit.cpp | 586 SourceManager *SourceMgr; member in __anone1cbdac30211::StoredDiagnosticConsumer 591 : StoredDiags(StoredDiags), SourceMgr(0) { } in StoredDiagnosticConsumer() 596 SourceMgr = &PP->getSourceManager(); in BeginSourceFile() 639 if (!Info.hasSourceManager() || &Info.getSourceManager() == SourceMgr) in HandleDiagnostic() 704 AST->SourceMgr = new SourceManager(AST->getDiagnostics(), in LoadFromASTFile() 1165 SourceMgr = new SourceManager(getDiagnostics(), *FileMgr, in Parse() 1673 SourceManager &SourceMgr = Clang->getSourceManager(); in getMainBufferWithPrecompiledPreamble() local 1675 = SourceMgr.getBuffer(SourceMgr.getMainFileID()); in getMainBufferWithPrecompiledPreamble() 1676 for (SourceManager::fileinfo_iterator F = SourceMgr.fileinfo_begin(), in getMainBufferWithPrecompiledPreamble() 1677 FEnd = SourceMgr.fileinfo_end(); in getMainBufferWithPrecompiledPreamble() [all …]
|
| D | CompilerInstance.cpp | 85 SourceMgr = Value; in setSourceManager() 206 SourceMgr = new SourceManager(getDiagnostics(), FileMgr); in createSourceManager() 605 SourceManager &SourceMgr, in InitializeSourceManager() argument 611 SourceMgr.createMainFileIDForMemBuffer(Input.getBuffer(), Kind); in InitializeSourceManager() 612 assert(!SourceMgr.getMainFileID().isInvalid() && in InitializeSourceManager() 638 SourceMgr.overrideFileContents(File, MB); in InitializeSourceManager() 645 SourceMgr.createMainFileID(File, Kind); in InitializeSourceManager() 654 SourceMgr.createMainFileID(File, Kind); in InitializeSourceManager() 655 SourceMgr.overrideFileContents(File, SB.take()); in InitializeSourceManager() 658 assert(!SourceMgr.getMainFileID().isInvalid() && in InitializeSourceManager() [all …]
|
| /freebsd-10-stable/contrib/llvm/tools/clang/lib/Edit/ |
| D | Commit.cpp | 39 : SourceMgr(Editor.getSourceManager()), LangOpts(Editor.getLangOpts()), in Commit() 229 const SourceManager &SM = SourceMgr; in canInsert() 253 SourceLocation spellLoc = SourceMgr.getSpellingLoc(loc); in canInsertAfterToken() 254 unsigned tokLen = Lexer::MeasureTokenLength(spellLoc, SourceMgr, LangOpts); in canInsertAfterToken() 260 const SourceManager &SM = SourceMgr; in canInsertAfterToken() 271 loc = Lexer::getLocForEndOfToken(loc, 0, SourceMgr, LangOpts); in canInsertAfterToken() 299 const SourceManager &SM = SourceMgr; in canRemoveRange() 333 StringRef file = SourceMgr.getBufferData(Offs.getFID(), &invalidTemp); in canReplaceText() 343 return Lexer::isAtStartOfMacroExpansion(loc, SourceMgr, LangOpts, MacroBegin); in isAtStartOfMacroExpansion() 347 return Lexer::isAtEndOfMacroExpansion(loc, SourceMgr, LangOpts, MacroEnd); in isAtEndOfMacroExpansion()
|
| D | EditedSource.cpp | 38 if (SourceMgr.isMacroArgExpansion(OrigLoc)) { in canInsertInOffset() 40 DefArgLoc = SourceMgr.getImmediateExpansionRange(OrigLoc).first; in canInsertInOffset() 42 ExpLoc = SourceMgr.getImmediateExpansionRange(DefArgLoc).first; in canInsertInOffset() 61 if (SourceMgr.isMacroArgExpansion(OrigLoc)) { in commitInsert() 63 DefArgLoc = SourceMgr.getImmediateExpansionRange(OrigLoc).first; in commitInsert() 65 ExpLoc = SourceMgr.getImmediateExpansionRange(DefArgLoc).first; in commitInsert() 359 applyRewrite(receiver, StrVec.str(), CurOffs, CurLen, SourceMgr, LangOpts); in applyRewrites() 366 applyRewrite(receiver, StrVec.str(), CurOffs, CurLen, SourceMgr, LangOpts); in applyRewrites() 378 SourceLocation BLoc = SourceMgr.getLocForStartOfFile(BeginOffs.getFID()); in getSourceText() 384 SourceMgr, LangOpts, &Invalid); in getSourceText()
|
| /freebsd-10-stable/contrib/llvm/lib/IRReader/ |
| D | IRReader.cpp | 41 Err = SMDiagnostic(Buffer->getBufferIdentifier(), SourceMgr::DK_Error, in getLazyIRModule() 57 Err = SMDiagnostic(Filename, SourceMgr::DK_Error, in getLazyIRFileModule() 74 Err = SMDiagnostic(Buffer->getBufferIdentifier(), SourceMgr::DK_Error, in ParseIR() 88 Err = SMDiagnostic(Filename, SourceMgr::DK_Error, in ParseIRFile()
|
| /freebsd-10-stable/contrib/llvm/tools/clang/include/clang/Rewrite/Core/ |
| D | Rewriter.h | 128 SourceManager *SourceMgr; variable 153 : SourceMgr(&SM), LangOpts(&LO) {} in Rewriter() 154 explicit Rewriter() : SourceMgr(0), LangOpts(0) {} in Rewriter() 157 SourceMgr = &SM; in setSourceMgr() 160 SourceManager &getSourceMgr() const { return *SourceMgr; } in getSourceMgr()
|
| /freebsd-10-stable/contrib/llvm/tools/clang/include/clang/Frontend/ |
| D | CompilerInstance.h | 81 IntrusiveRefCntPtr<SourceManager> SourceMgr; variable 338 bool hasSourceManager() const { return SourceMgr != 0; } in hasSourceManager() 342 assert(SourceMgr && "Compiler instance has no source manager!"); in getSourceManager() 343 return *SourceMgr; in getSourceManager() 347 SourceMgr.resetWithoutRelease(); in resetAndLeakSourceManager() 652 SourceManager &SourceMgr,
|
| /freebsd-10-stable/contrib/llvm/tools/clang/include/clang/Edit/ |
| D | EditedSource.h | 28 const SourceManager &SourceMgr; variable 51 : SourceMgr(SM), LangOpts(LangOpts), PPRec(PPRec), in SourceMgr() function 55 const SourceManager &getSourceManager() const { return SourceMgr; } in getSourceManager()
|