aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/PCHReader.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Frontend/PCHReader.h')
-rw-r--r--include/clang/Frontend/PCHReader.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/clang/Frontend/PCHReader.h b/include/clang/Frontend/PCHReader.h
index 0c8520ceb4..c6f7ad9301 100644
--- a/include/clang/Frontend/PCHReader.h
+++ b/include/clang/Frontend/PCHReader.h
@@ -27,6 +27,7 @@
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Bitcode/BitstreamReader.h"
+#include "llvm/Support/Allocator.h"
#include "llvm/Support/DataTypes.h"
#include <map>
#include <string>
@@ -85,6 +86,9 @@ private:
/// \brief The bitstream reader from which we'll read the PCH file.
llvm::BitstreamReader Stream;
+ /// \brief Allocator used for IdentifierInfo objects.
+ llvm::BumpPtrAllocator Alloc;
+
/// \brief The file name of the PCH file.
std::string FileName;
@@ -370,6 +374,13 @@ public:
IdentifierInfo *GetIdentifierInfo(const RecordData &Record, unsigned &Idx) {
return DecodeIdentifierInfo(Record[Idx++]);
}
+
+ /// \brief Builds a new IdentifierInfo object that refers to a
+ /// string stored within the PCH file.
+ ///
+ /// \brief Str must be a pointer into the start of a string within
+ /// IdentifierTableData.
+ IdentifierInfo &BuildIdentifierInfoInsidePCH(const unsigned char *Str);
Selector DecodeSelector(unsigned Idx);