File tree Expand file tree Collapse file tree 3 files changed +15
-35
lines changed Expand file tree Collapse file tree 3 files changed +15
-35
lines changed Original file line number Diff line number Diff line change @@ -470,6 +470,21 @@ class PCHReader
470
470
void SetLabelOf (AddrLabelExpr *S, unsigned ID);
471
471
};
472
472
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
+
473
488
} // end namespace clang
474
489
475
490
#endif
Original file line number Diff line number Diff line change 33
33
#include < cstdio>
34
34
using namespace clang ;
35
35
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
-
53
36
// ===----------------------------------------------------------------------===//
54
37
// PCH reader implementation
55
38
// ===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change 20
20
#include " clang/AST/Expr.h"
21
21
using namespace clang ;
22
22
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
-
41
23
42
24
// ===----------------------------------------------------------------------===//
43
25
// Declaration deserialization
You can’t perform that action at this time.
0 commit comments