@@ -51,24 +51,24 @@ namespace SrcMgr {
51
51
class ContentCache {
52
52
// / Buffer - The actual buffer containing the characters from the input
53
53
// / file. This is owned by the ContentCache object.
54
- const llvm::MemoryBuffer* Buffer;
54
+ mutable const llvm::MemoryBuffer * Buffer;
55
55
56
56
public:
57
57
// / Reference to the file entry. This reference does not own
58
58
// / the FileEntry object. It is possible for this to be NULL if
59
59
// / the ContentCache encapsulates an imaginary text buffer.
60
- const FileEntry* Entry;
60
+ const FileEntry * Entry;
61
61
62
62
// / SourceLineCache - A new[]'d array of offsets for each source line. This
63
63
// / is lazily computed. This is owned by the ContentCache object.
64
- unsigned * SourceLineCache;
64
+ unsigned * SourceLineCache;
65
65
66
66
// / NumLines - The number of lines in this ContentCache. This is only valid
67
67
// / if SourceLineCache is non-null.
68
68
unsigned NumLines;
69
69
70
70
// / getBuffer - Returns the memory buffer for the associated content.
71
- const llvm::MemoryBuffer* getBuffer () const ;
71
+ const llvm::MemoryBuffer * getBuffer () const ;
72
72
73
73
// / getSize - Returns the size of the content encapsulated by this
74
74
// / ContentCache. This can be the size of the source file or the size of an
@@ -81,20 +81,20 @@ namespace SrcMgr {
81
81
// / instantiated.
82
82
unsigned getSizeBytesMapped () const ;
83
83
84
- void setBuffer (const llvm::MemoryBuffer* B) {
84
+ void setBuffer (const llvm::MemoryBuffer * B) {
85
85
assert (!Buffer && " MemoryBuffer already set." );
86
86
Buffer = B;
87
87
}
88
88
89
- ContentCache (const FileEntry* e = NULL )
89
+ ContentCache (const FileEntry * e = NULL )
90
90
: Buffer(NULL ), Entry(e), SourceLineCache(NULL ), NumLines(0 ) {}
91
91
92
92
~ContentCache ();
93
93
94
94
// / The copy ctor does not allow copies where source object has either
95
95
// / a non-NULL Buffer or SourceLineCache. Ownership of allocated memory
96
96
// / is not transfered, so this is a logical error.
97
- ContentCache (const ContentCache& RHS) : Buffer(NULL ),SourceLineCache(NULL ) {
97
+ ContentCache (const ContentCache & RHS) : Buffer(NULL ),SourceLineCache(NULL ) {
98
98
Entry = RHS.Entry ;
99
99
100
100
assert (RHS.Buffer == NULL && RHS.SourceLineCache == NULL
@@ -104,16 +104,16 @@ namespace SrcMgr {
104
104
}
105
105
106
106
// / Emit - Emit this ContentCache to Bitcode.
107
- void Emit (llvm::Serializer& S) const ;
107
+ void Emit (llvm::Serializer & S) const ;
108
108
109
109
// / ReadToSourceManager - Reconstitute a ContentCache from Bitcode
110
110
// and store it in the specified SourceManager.
111
- static void ReadToSourceManager (llvm::Deserializer& D, SourceManager& SMgr ,
112
- FileManager* FMgr, std::vector<char >& Buf);
111
+ static void ReadToSourceManager (llvm::Deserializer & D, SourceManager &SM ,
112
+ FileManager * FMgr, std::vector<char > & Buf);
113
113
114
114
private:
115
115
// Disable assignments.
116
- ContentCache& operator =(const ContentCache& RHS);
116
+ ContentCache & operator =(const ContentCache& RHS);
117
117
};
118
118
119
119
// / FileIDInfo - Information about a FileID, basically just the logical file
@@ -150,7 +150,7 @@ namespace SrcMgr {
150
150
unsigned FileCharacteristic : 2 ;
151
151
152
152
// / Content - Information about the source buffer itself.
153
- const ContentCache* Content;
153
+ const ContentCache * Content;
154
154
155
155
public:
156
156
// / get - Return a FileIDInfo object.
0 commit comments