diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-23 14:22:18 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-23 14:22:18 +0000 |
| commit | 73490b890977362d28dd6326843a1ecae413921d (patch) | |
| tree | 3fdd91eae574e32453a4baf462961c742df2691a /include/clang/Basic/SourceManager.h | |
| parent | a5f348eb914e67b51914117fac117c18c1f8d650 (diff) | |
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
| -rw-r--r-- | include/clang/Basic/SourceManager.h | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index 7eb988f005ec0..8a69cba066b3e 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -685,26 +685,19 @@ public: /// void PrintStats() const; - // Iteration over the source location entry table. - typedef std::vector<SrcMgr::SLocEntry>::const_iterator sloc_entry_iterator; - - sloc_entry_iterator sloc_entry_begin() const { - return SLocEntryTable.begin(); - } - - sloc_entry_iterator sloc_entry_end() const { - return SLocEntryTable.end(); - } - unsigned sloc_entry_size() const { return SLocEntryTable.size(); } - const SrcMgr::SLocEntry &getSLocEntry(FileID FID) const { - assert(FID.ID < SLocEntryTable.size() && "Invalid id"); + const SrcMgr::SLocEntry &getSLocEntry(unsigned ID) const { + assert(ID < SLocEntryTable.size() && "Invalid id"); if (ExternalSLocEntries && - FID.ID < SLocEntryLoaded.size() && - !SLocEntryLoaded[FID.ID]) - ExternalSLocEntries->ReadSLocEntry(FID.ID); - return SLocEntryTable[FID.ID]; + ID < SLocEntryLoaded.size() && + !SLocEntryLoaded[ID]) + ExternalSLocEntries->ReadSLocEntry(ID); + return SLocEntryTable[ID]; + } + + const SrcMgr::SLocEntry &getSLocEntry(FileID FID) const { + return getSLocEntry(FID.ID); } unsigned getNextOffset() const { return NextOffset; } |
