Skip to content

Commit 9df8a73

Browse files
committed
unclone SavedStreamPosition
llvm-svn: 70192
1 parent 8f63ab5 commit 9df8a73

File tree

3 files changed

+15
-35
lines changed

3 files changed

+15
-35
lines changed

clang/include/clang/Frontend/PCHReader.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,21 @@ class PCHReader
470470
void SetLabelOf(AddrLabelExpr *S, unsigned ID);
471471
};
472472

473+
/// \brief Helper class that saves the current stream position and
474+
/// then restores it when destroyed.
475+
struct SavedStreamPosition {
476+
explicit SavedStreamPosition(llvm::BitstreamCursor &Cursor)
477+
: Cursor(Cursor), Offset(Cursor.GetCurrentBitNo()) { }
478+
479+
~SavedStreamPosition() {
480+
Cursor.JumpToBit(Offset);
481+
}
482+
483+
private:
484+
llvm::BitstreamCursor &Cursor;
485+
uint64_t Offset;
486+
};
487+
473488
} // end namespace clang
474489

475490
#endif

clang/lib/Frontend/PCHReader.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,6 @@
3333
#include <cstdio>
3434
using namespace clang;
3535

36-
namespace {
37-
/// \brief Helper class that saves the current stream position and
38-
/// then restores it when destroyed.
39-
struct VISIBILITY_HIDDEN SavedStreamPosition {
40-
explicit SavedStreamPosition(llvm::BitstreamCursor &Cursor)
41-
: Cursor(Cursor), Offset(Cursor.GetCurrentBitNo()) { }
42-
43-
~SavedStreamPosition() {
44-
Cursor.JumpToBit(Offset);
45-
}
46-
47-
private:
48-
llvm::BitstreamCursor &Cursor;
49-
uint64_t Offset;
50-
};
51-
}
52-
5336
//===----------------------------------------------------------------------===//
5437
// PCH reader implementation
5538
//===----------------------------------------------------------------------===//

clang/lib/Frontend/PCHReaderDecl.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,6 @@
2020
#include "clang/AST/Expr.h"
2121
using namespace clang;
2222

23-
// FIXME: Temporarily cloned from PCHReader.cpp.
24-
namespace {
25-
/// \brief Helper class that saves the current stream position and
26-
/// then restores it when destroyed.
27-
struct SavedStreamPosition {
28-
explicit SavedStreamPosition(llvm::BitstreamCursor &Cursor)
29-
: Cursor(Cursor), Offset(Cursor.GetCurrentBitNo()) { }
30-
31-
~SavedStreamPosition() {
32-
Cursor.JumpToBit(Offset);
33-
}
34-
35-
private:
36-
llvm::BitstreamCursor &Cursor;
37-
uint64_t Offset;
38-
};
39-
}
40-
4123

4224
//===----------------------------------------------------------------------===//
4325
// Declaration deserialization

0 commit comments

Comments
 (0)