aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/SourceManagerInternals.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-06-08 16:40:28 +0000
committerDouglas Gregor <dgregor@apple.com>2012-06-08 16:40:28 +0000
commit47d9de678162202786aa5f8aa153a7c58a4cebd4 (patch)
treebcffdfe8a704b8b38f939c786246f60de5160d81 /include/clang/Basic/SourceManagerInternals.h
parent374a00bcc6e26b4fc3cd1d378a5d056c4c7d618e (diff)
Switch LineTableInfo to use FileID instead of int for file references,
from Tom Honermann! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158211 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManagerInternals.h')
-rw-r--r--include/clang/Basic/SourceManagerInternals.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/clang/Basic/SourceManagerInternals.h b/include/clang/Basic/SourceManagerInternals.h
index 1cb16b458f..827de30aeb 100644
--- a/include/clang/Basic/SourceManagerInternals.h
+++ b/include/clang/Basic/SourceManagerInternals.h
@@ -15,6 +15,7 @@
#ifndef LLVM_CLANG_SOURCEMANAGER_INTERNALS_H
#define LLVM_CLANG_SOURCEMANAGER_INTERNALS_H
+#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "llvm/ADT/StringMap.h"
#include <map>
@@ -84,7 +85,7 @@ class LineTableInfo {
/// LineEntries - This is a map from FileIDs to a list of line entries (sorted
/// by the offset they occur in the file.
- std::map<int, std::vector<LineEntry> > LineEntries;
+ std::map<FileID, std::vector<LineEntry> > LineEntries;
public:
LineTableInfo() {
}
@@ -104,25 +105,25 @@ public:
}
unsigned getNumFilenames() const { return FilenamesByID.size(); }
- void AddLineNote(int FID, unsigned Offset,
+ void AddLineNote(FileID FID, unsigned Offset,
unsigned LineNo, int FilenameID);
- void AddLineNote(int FID, unsigned Offset,
+ void AddLineNote(FileID FID, unsigned Offset,
unsigned LineNo, int FilenameID,
unsigned EntryExit, SrcMgr::CharacteristicKind FileKind);
/// FindNearestLineEntry - Find the line entry nearest to FID that is before
/// it. If there is no line entry before Offset in FID, return null.
- const LineEntry *FindNearestLineEntry(int FID, unsigned Offset);
+ const LineEntry *FindNearestLineEntry(FileID FID, unsigned Offset);
// Low-level access
- typedef std::map<int, std::vector<LineEntry> >::iterator iterator;
+ typedef std::map<FileID, std::vector<LineEntry> >::iterator iterator;
iterator begin() { return LineEntries.begin(); }
iterator end() { return LineEntries.end(); }
/// \brief Add a new line entry that has already been encoded into
/// the internal representation of the line table.
- void AddEntry(int FID, const std::vector<LineEntry> &Entries);
+ void AddEntry(FileID FID, const std::vector<LineEntry> &Entries);
};
} // end namespace clang