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 2121#include " llvm/ADT/SmallString.h"
2222#include " llvm/ADT/StringRef.h"
2323#include " llvm/ADT/StringMap.h"
24+ #include " llvm/Support/Debug.h"
2425#include " llvm/Support/raw_ostream.h"
2526
2627namespace swift {
@@ -100,14 +101,24 @@ class Mangler {
100101 return StringRef (Storage.data (), Storage.size ());
101102 }
102103
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:
103115 // / Removes the last characters of the buffer by setting it's size to a
104116 // / smaller value.
105117 void resetBuffer (size_t toPos) {
106118 assert (toPos <= Storage.size ());
107119 Storage.resize (toPos);
108120 }
109121
110- protected:
111122 Mangler () : Buffer(Storage) { }
112123
113124 // / Begins a new mangling but does not add the mangling prefix.
You can’t perform that action at this time.
0 commit comments