File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 21
21
#include " llvm/ADT/SmallString.h"
22
22
#include " llvm/ADT/StringRef.h"
23
23
#include " llvm/ADT/StringMap.h"
24
+ #include " llvm/Support/Debug.h"
24
25
#include " llvm/Support/raw_ostream.h"
25
26
26
27
namespace swift {
@@ -100,14 +101,24 @@ class Mangler {
100
101
return StringRef (Storage.data (), Storage.size ());
101
102
}
102
103
104
+ void print (llvm::raw_ostream &os) const {
105
+ os << getBufferStr () << ' \n ' ;
106
+ }
107
+
108
+ public:
109
+ // / Dump the current stored state in the Mangler. Only for use in the debugger!
110
+ SWIFT_DEBUG_DUMPER (dumpBufferStr()) {
111
+ print (llvm::dbgs ());
112
+ }
113
+
114
+ protected:
103
115
// / Removes the last characters of the buffer by setting it's size to a
104
116
// / smaller value.
105
117
void resetBuffer (size_t toPos) {
106
118
assert (toPos <= Storage.size ());
107
119
Storage.resize (toPos);
108
120
}
109
121
110
- protected:
111
122
Mangler () : Buffer(Storage) { }
112
123
113
124
// / Begins a new mangling but does not add the mangling prefix.
You can’t perform that action at this time.
0 commit comments