source: icGREP/icgrep-devel/icgrep/pablo/pe_call.h @ 4200

Last change on this file since 4200 was 4200, checked in by nmedfort, 5 years ago

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

File size: 752 bytes
Line 
1#ifndef PE_CALL_H
2#define PE_CALL_H
3
4#include "pe_pabloe.h"
5#include <string>
6
7namespace pablo {
8
9class Call : public PabloE {
10    friend Call * make_call(const std::string callee);
11public:
12    static inline bool classof(const PabloE * e) {
13        return e->getClassTypeId() == ClassTypeId::Call;
14    }
15    static inline bool classof(const void *) {
16        return false;
17    }
18    virtual ~Call() {
19
20    }
21
22    inline const std::string & getCallee() const {
23        return mCallee;
24    }
25protected:
26    Call(const std::string callee)
27    : PabloE(ClassTypeId::Call)
28    , mCallee(callee) {
29
30    }
31private:
32    const std::string mCallee;
33};
34
35inline Call * make_call(const std::string callee) {
36    return new Call(callee);
37}
38
39}
40
41#endif // PE_CALL_H
42
43
Note: See TracBrowser for help on using the repository browser.