Ignore:
Timestamp:
Sep 30, 2014, 2:44:40 PM (5 years ago)
Author:
nmedfort
Message:

Replaced dynamic_cast with llvm::dyn_cast in pablo code; implemented make functions for pablo constructors. Disabled RTTI.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/ps_if.h

    r4199 r4200  
    1616public:
    1717    typedef std::list<PabloE*> List;
     18    friend If * make_if(PabloE * expr, List psl);
    1819
    19     If(PabloE * expr, List psl)
    20     : PabloE(ClassTypeId::If)
    21     , mExpr(expr)
    22     , mPSList(psl)
    23     {
     20    static inline bool classof(const PabloE * e) {
     21        return e->getClassTypeId() == ClassTypeId::If;
     22    }
     23    static inline bool classof(const void *) {
     24        return false;
     25    }
    2426
    25     }
     27
    2628
    2729    virtual ~If() {
     
    3941        return mPSList;
    4042    }
     43protected:
     44    If(PabloE * expr, List psl)
     45    : PabloE(ClassTypeId::If)
     46    , mExpr(expr)
     47    , mPSList(psl)
     48    {
    4149
     50    }
    4251private:
    43     PabloE* mExpr;
    44     List mPSList;
     52    PabloE * const mExpr;
     53    List           mPSList;
    4554};
     55
     56inline If * make_if(PabloE * expr, If::List statements) {
     57    return new If(expr, statements);
     58}
    4659
    4760}
Note: See TracChangeset for help on using the changeset viewer.