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_all.h

    r4199 r4200  
    1313
    1414class All : public PabloE {
     15    friend All * make_all(bool value);
    1516public:
    16 
    17     All(const bool value)
    18     : PabloE(ClassTypeId::All)
    19     , mValue(value)
    20     {
    21 
     17    static inline bool classof(const PabloE * e) {
     18        return e->getClassTypeId() == ClassTypeId::All;
     19    }
     20    static inline bool classof(const void *) {
     21        return false;
    2222    }
    2323
     
    2929        return mValue;
    3030    }
     31protected:
     32    All(const bool value)
     33    : PabloE(ClassTypeId::All)
     34    , mValue(value)
     35    {
    3136
    32     inline void setValue(const bool value) {
    33         mValue = value;
    3437    }
     38private:
     39    const bool mValue;
     40};
    3541
    36 private:
    37     bool mValue;
    38 };
     42inline All * make_all(bool value) {
     43    return new All(value);
     44}
    3945
    4046}
Note: See TracChangeset for help on using the changeset viewer.