~eda-qa/leaflang/cpp

« back to all changes in this revision

Viewing changes to src/ir/dump.cpp

  • Committer: edA-qa mort-ora-y
  • Date: 2017-08-19 06:03:00 UTC
  • mfrom: (100.1.22 misc)
  • Revision ID: eda-qa@disemia.com-20170819060300-209dwd5884343mi0
merging miscelaneous changes, mainly platform improvements

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
#include "util/validation_context.hpp"
4
4
 
5
5
#include <boost/algorithm/string.hpp>
 
6
#include <boost/scope_exit.hpp>
6
7
 
7
8
#include <iostream>
8
9
 
196
197
void dump::write( type const * t, bool force_expand )
197
198
{
198
199
        CHECK_NULL( t, "type" )
199
 
        
 
200
 
200
201
        if( t->name.size() ) {
201
202
                named_types.insert( t );
202
203
                out << t->name;
206
207
                out << " : ";
207
208
        }
208
209
                
 
210
        if( recurse_types.find(t) != recurse_types.end() ) {
 
211
                out << "recurse";
 
212
                return;
 
213
        }
 
214
        recurse_types.insert(t);
 
215
        BOOST_SCOPE_EXIT_ALL(=) {
 
216
                recurse_types.erase(t);
 
217
        };
 
218
        
209
219
        switch( t->fundamental )
210
220
        {
211
221
                case type::f_function_ptr: {