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/pe_advance.h

    r4199 r4200  
    1313
    1414class Advance : public PabloE {
     15    friend Advance * make_advance(PabloE * expr);
    1516public:
    16     Advance(PabloE * expr)
    17     : PabloE(ClassTypeId::Advance)
    18     , mExpr(expr) {
    19 
     17    static inline bool classof(const PabloE * e) {
     18        return e->getClassTypeId() == ClassTypeId::Advance;
    2019    }
    21 
     20    static inline bool classof(const void *) {
     21        return false;
     22    }
    2223    virtual ~Advance() {
    2324        delete mExpr;
     
    2728        return mExpr;
    2829    }
     30protected:
     31    Advance(PabloE * expr)
     32    : PabloE(ClassTypeId::Advance)
     33    , mExpr(expr) {
    2934
     35    }
    3036private:
    31     PabloE * mExpr;
     37    PabloE * const mExpr;
    3238};
     39
     40inline Advance * make_advance(PabloE * expr) {
     41    return new Advance(expr);
     42}
    3343
    3444}
Note: See TracChangeset for help on using the changeset viewer.