source: icGREP/icgrep-devel/icgrep/pablo/pe_infile.h @ 5299

Last change on this file since 5299 was 5230, checked in by nmedfort, 3 years ago

Multi-threading support for PabloAST / PabloCompiler?. Requires unique LLVM Context / Module for each thread.

File size: 1.3 KB
Line 
1/*
2 *  Copyright (c) 2016 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#ifndef PE_INFILE_H
8#define PE_INFILE_H
9
10#include <pablo/pabloAST.h>
11
12namespace pablo {
13
14class InFile : public Statement {
15    friend class PabloBlock;
16public:
17    static inline bool classof(const PabloAST * e) {
18        return e->getClassTypeId() == ClassTypeId::InFile;
19    }
20    static inline bool classof(const void *) {
21        return false;
22    }
23    virtual ~InFile(){
24    }
25    PabloAST * getExpr() const {
26        return getOperand(0);
27    }
28protected:
29    InFile(PabloAST * expr, const String * name, Allocator & allocator)
30    : Statement(ClassTypeId::InFile, expr->getType(), {expr}, name, allocator) {
31
32    }
33};
34
35class AtEOF : public Statement {
36    friend class PabloBlock;
37public:
38    static inline bool classof(const PabloAST * e) {
39        return e->getClassTypeId() == ClassTypeId::AtEOF;
40    }
41    static inline bool classof(const void *) {
42        return false;
43    }
44    virtual ~AtEOF(){
45    }
46    PabloAST * getExpr() const {
47        return getOperand(0);
48    }
49protected:
50    AtEOF(PabloAST * expr, const String * name, Allocator & allocator)
51    : Statement(ClassTypeId::AtEOF, expr->getType(), {expr}, name, allocator) {
52
53    }
54};
55   
56}
57
58#endif // PE_INFILE_H
Note: See TracBrowser for help on using the repository browser.