Changeset 0b3b2ae for src/SynTree


Ignore:
Timestamp:
Jun 22, 2018, 3:43:19 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, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
ed34540
Parents:
c194661
git-author:
Rob Schluntz <rschlunt@…> (06/22/18 14:48:30)
git-committer:
Rob Schluntz <rschlunt@…> (06/22/18 15:43:19)
Message:

Minor code cleanup

Location:
src/SynTree
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/ReferenceToType.cc

    rc194661 r0b3b2ae  
    7676bool StructInstType::isComplete() const { return baseStruct ? baseStruct->has_body() : false; }
    7777
    78 AggregateDecl * StructInstType::getAggr() { return baseStruct; }
     78AggregateDecl * StructInstType::getAggr() const { return baseStruct; }
    7979
    8080TypeSubstitution StructInstType::genericSubstitution() const {
     
    119119bool UnionInstType::isComplete() const { return baseUnion ? baseUnion->has_body() : false; }
    120120
    121 AggregateDecl * UnionInstType::getAggr() { return baseUnion; }
     121AggregateDecl * UnionInstType::getAggr() const { return baseUnion; }
    122122
    123123TypeSubstitution UnionInstType::genericSubstitution() const {
     
    152152bool EnumInstType::isComplete() const { return baseEnum ? baseEnum->has_body() : false; }
    153153
     154AggregateDecl * EnumInstType::getAggr() const { return baseEnum; }
     155
    154156void EnumInstType::print( std::ostream &os, Indenter indent ) const {
    155157        using std::endl;
  • src/SynTree/Type.cc

    rc194661 r0b3b2ae  
    129129GlobalScopeType::GlobalScopeType() : Type( Type::Qualifiers(), {} ) {}
    130130
    131 void GlobalScopeType::print( std::ostream & os, Indenter indent ) const {
     131void GlobalScopeType::print( std::ostream & os, Indenter ) const {
    132132        os << "Global Scope Type" << endl;
    133133}
  • src/SynTree/Type.h

    rc194661 r0b3b2ae  
    178178        virtual bool isComplete() const { return true; }
    179179
    180         virtual AggregateDecl * getAggr() { assertf( false, "Non-aggregate type: %s", toCString( this ) ); }
     180        virtual AggregateDecl * getAggr() const { assertf( false, "Non-aggregate type: %s", toCString( this ) ); }
    181181
    182182        virtual TypeSubstitution genericSubstitution() const;
     
    431431        virtual bool isComplete() const override;
    432432
    433         virtual AggregateDecl * getAggr() override;
     433        virtual AggregateDecl * getAggr() const override;
    434434
    435435        virtual TypeSubstitution genericSubstitution() const override;
     
    468468        virtual bool isComplete() const override;
    469469
    470         virtual AggregateDecl * getAggr() override;
     470        virtual AggregateDecl * getAggr() const override;
    471471
    472472        virtual TypeSubstitution genericSubstitution() const override;
     
    500500
    501501        virtual bool isComplete() const override;
     502
     503        virtual AggregateDecl * getAggr() const;
    502504
    503505        virtual EnumInstType *clone() const override { return new EnumInstType( *this ); }
Note: See TracChangeset for help on using the changeset viewer.