Ignore:
Timestamp:
Dec 21, 2016, 2:54:31 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
e33f321
Parents:
6d4d1a6
Message:

name mangling for ttype, fix SynTree? operator<< to work with nullptr, add isTtype check, ttype variables are automatically "sized"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/FunctionType.cc

    r6d4d1a6 r8bf784a  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FunctionType.cc -- 
     7// FunctionType.cc --
    88//
    99// Author           : Richard C. Bilson
     
    1919#include "Declaration.h"
    2020#include "Common/utility.h"
     21#include "Tuples/Tuples.h"
    2122
    2223FunctionType::FunctionType( const Type::Qualifiers &tq, bool isVarArgs ) : Type( tq ), isVarArgs( isVarArgs ) {
     
    3132        deleteAll( returnVals );
    3233        deleteAll( parameters );
     34}
     35
     36namespace {
     37        bool containsTtype( const std::list<DeclarationWithType * > & l ) {
     38                if ( ! l.empty() ) {
     39                        return Tuples::isTtype( l.back()->get_type() );
     40                }
     41                return false;
     42        }
     43}
     44
     45bool FunctionType::isTtype() const {
     46        return containsTtype( returnVals ) || containsTtype( parameters );
    3347}
    3448
Note: See TracChangeset for help on using the changeset viewer.