aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/PTHManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Lex/PTHManager.h')
-rw-r--r--include/clang/Lex/PTHManager.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/include/clang/Lex/PTHManager.h b/include/clang/Lex/PTHManager.h
index 507576473f..ff1a17259e 100644
--- a/include/clang/Lex/PTHManager.h
+++ b/include/clang/Lex/PTHManager.h
@@ -32,29 +32,29 @@ class FileEntry;
class PTHLexer;
class Diagnostic;
class StatSysCallCache;
-
+
class PTHManager : public IdentifierInfoLookup {
friend class PTHLexer;
-
+
/// The memory mapped PTH file.
const llvm::MemoryBuffer* Buf;
/// Alloc - Allocator used for IdentifierInfo objects.
llvm::BumpPtrAllocator Alloc;
-
+
/// IdMap - A lazily generated cache mapping from persistent identifiers to
/// IdentifierInfo*.
IdentifierInfo** PerIDCache;
-
+
/// FileLookup - Abstract data structure used for mapping between files
/// and token data in the PTH file.
void* FileLookup;
-
+
/// IdDataTable - Array representing the mapping from persistent IDs to the
/// data offset within the PTH file containing the information to
/// reconsitute an IdentifierInfo.
const unsigned char* const IdDataTable;
-
+
/// SortedIdTable - Abstract data structure mapping from strings to
/// persistent IDs. This is used by get().
void* StringIdLookup;
@@ -65,15 +65,15 @@ class PTHManager : public IdentifierInfoLookup {
/// PP - The Preprocessor object that will use this PTHManager to create
/// PTHLexer objects.
Preprocessor* PP;
-
- /// SpellingBase - The base offset within the PTH memory buffer that
+
+ /// SpellingBase - The base offset within the PTH memory buffer that
/// contains the cached spellings for literals.
const unsigned char* const SpellingBase;
-
+
/// OriginalSourceFile - A null-terminated C-string that specifies the name
/// if the file (if any) that was to used to generate the PTH cache.
const char* OriginalSourceFile;
-
+
/// This constructor is intended to only be called by the static 'Create'
/// method.
PTHManager(const llvm::MemoryBuffer* buf, void* fileLookup,
@@ -84,11 +84,11 @@ class PTHManager : public IdentifierInfoLookup {
// Do not implement.
PTHManager();
void operator=(const PTHManager&);
-
- /// getSpellingAtPTHOffset - Used by PTHLexer classes to get the cached
+
+ /// getSpellingAtPTHOffset - Used by PTHLexer classes to get the cached
/// spelling for a token.
unsigned getSpellingAtPTHOffset(unsigned PTHOffset, const char*& Buffer);
-
+
/// GetIdentifierInfo - Used to reconstruct IdentifierInfo objects from the
/// PTH file.
inline IdentifierInfo* GetIdentifierInfo(unsigned PersistentID) {
@@ -98,44 +98,44 @@ class PTHManager : public IdentifierInfoLookup {
return LazilyCreateIdentifierInfo(PersistentID);
}
IdentifierInfo* LazilyCreateIdentifierInfo(unsigned PersistentID);
-
+
public:
// The current PTH version.
enum { Version = 9 };
~PTHManager();
-
+
/// getOriginalSourceFile - Return the full path to the original header
/// file name that was used to generate the PTH cache.
const char* getOriginalSourceFile() const {
return OriginalSourceFile;
}
-
+
/// get - Return the identifier token info for the specified named identifier.
/// Unlike the version in IdentifierTable, this returns a pointer instead
/// of a reference. If the pointer is NULL then the IdentifierInfo cannot
/// be found.
IdentifierInfo *get(const char *NameStart, const char *NameEnd);
-
+
/// Create - This method creates PTHManager objects. The 'file' argument
/// is the name of the PTH file. This method returns NULL upon failure.
static PTHManager *Create(const std::string& file, Diagnostic* Diags = 0,
Diagnostic::Level failureLevel=Diagnostic::Warning);
- void setPreprocessor(Preprocessor *pp) { PP = pp; }
-
+ void setPreprocessor(Preprocessor *pp) { PP = pp; }
+
/// CreateLexer - Return a PTHLexer that "lexes" the cached tokens for the
/// specified file. This method returns NULL if no cached tokens exist.
/// It is the responsibility of the caller to 'delete' the returned object.
- PTHLexer *CreateLexer(FileID FID);
-
+ PTHLexer *CreateLexer(FileID FID);
+
/// createStatCache - Returns a StatSysCallCache object for use with
/// FileManager objects. These objects use the PTH data to speed up
/// calls to stat by memoizing their results from when the PTH file
/// was generated.
StatSysCallCache *createStatCache();
};
-
+
} // end namespace clang
#endif