File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 16
16
#include " FunctionPointer.h"
17
17
#include " Integral.h"
18
18
#include " IntegralAP.h"
19
+ #include " InterpFrame.h"
19
20
#include " Opcode.h"
20
21
#include " PrimType.h"
21
22
#include " Program.h"
@@ -206,3 +207,29 @@ LLVM_DUMP_METHOD void Descriptor::dump(llvm::raw_ostream &OS) const {
206
207
if (isDummy ())
207
208
OS << " dummy" ;
208
209
}
210
+
211
+ LLVM_DUMP_METHOD void InterpFrame::dump (llvm::raw_ostream &OS,
212
+ unsigned Indent) const {
213
+ unsigned Spaces = Indent * 2 ;
214
+ {
215
+ ColorScope SC (OS, true , {llvm::raw_ostream::BLUE, true });
216
+ OS.indent (Spaces);
217
+ if (getCallee ())
218
+ describe (OS);
219
+ else
220
+ OS << " Frame (Depth: " << getDepth () << " )" ;
221
+ OS << " \n " ;
222
+ }
223
+ OS.indent (Spaces) << " Function: " << getFunction ();
224
+ if (const Function *F = getFunction ()) {
225
+ OS << " (" << F->getName () << " )" ;
226
+ }
227
+ OS << " \n " ;
228
+ OS.indent (Spaces) << " This: " << getThis () << " \n " ;
229
+ OS.indent (Spaces) << " RVO: " << getRVOPtr () << " \n " ;
230
+
231
+ while (const InterpFrame *F = this ->Caller ) {
232
+ F->dump (OS, Indent + 1 );
233
+ F = F->Caller ;
234
+ }
235
+ }
Original file line number Diff line number Diff line change @@ -123,6 +123,9 @@ class InterpFrame final : public Frame {
123
123
124
124
unsigned getDepth () const { return Depth; }
125
125
126
+ void dump () const { dump (llvm::errs (), 0 ); }
127
+ void dump (llvm::raw_ostream &OS, unsigned Indent = 0 ) const ;
128
+
126
129
private:
127
130
// / Returns an original argument from the stack.
128
131
template <typename T> const T &stackRef (unsigned Offset) const {
You can’t perform that action at this time.
0 commit comments