summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/include/clang/Frontend/PCHReader.h6
-rw-r--r--clang/lib/Frontend/PCHReaderDecl.cpp2
2 files changed, 3 insertions, 5 deletions
diff --git a/clang/include/clang/Frontend/PCHReader.h b/clang/include/clang/Frontend/PCHReader.h
index 9002c169b54..79682edbf2a 100644
--- a/clang/include/clang/Frontend/PCHReader.h
+++ b/clang/include/clang/Frontend/PCHReader.h
@@ -64,6 +64,7 @@ class Preprocessor;
class Sema;
class SwitchCase;
class PCHReader;
+class PCHDeclReader;
struct HeaderFileInfo;
struct PCHPredefinesBlock {
@@ -169,6 +170,7 @@ class PCHReader
public:
enum PCHReadResult { Success, Failure, IgnorePCH };
friend class PCHValidator;
+ friend class PCHDeclReader;
private:
/// \brief The receiver of some callbacks invoked by PCHReader.
llvm::OwningPtr<PCHReaderListener> Listener;
@@ -866,10 +868,6 @@ public:
/// imported.
Sema *getSema() { return SemaObj; }
- /// \brief Retrieve the stream that this PCH reader is reading from.
- llvm::BitstreamCursor &getStream() { return Chain[0]->Stream; }
- llvm::BitstreamCursor &getDeclsCursor() { return Chain[0]->DeclsCursor; }
-
/// \brief Retrieve the identifier table associated with the
/// preprocessor.
IdentifierTable &getIdentifierTable();
diff --git a/clang/lib/Frontend/PCHReaderDecl.cpp b/clang/lib/Frontend/PCHReaderDecl.cpp
index e494f7c9345..0231fa66a95 100644
--- a/clang/lib/Frontend/PCHReaderDecl.cpp
+++ b/clang/lib/Frontend/PCHReaderDecl.cpp
@@ -117,7 +117,7 @@ void PCHDeclReader::Visit(Decl *D) {
} else if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
// FunctionDecl's body was written last after all other Stmts/Exprs.
if (Record[Idx++])
- FD->setLazyBody(Reader.getDeclsCursor().GetCurrentBitNo());
+ FD->setLazyBody(Reader.Chain[0]->DeclsCursor.GetCurrentBitNo());
}
}
OpenPOWER on IntegriCloud