source: icGREP/icgrep-devel/icgrep/pablo/pe_not.cpp @ 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: 502 bytes
Line 
1/*
2 *  Copyright (c) 2014 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#include "pe_not.h"
8#include "pe_all.h"
9
10namespace pablo {
11
12PabloE * make_not(PabloE * expr) {
13    if (All * all = dyn_cast<All>(expr)) {
14        return make_all(!all->getValue());
15    }
16    else if (Not * pe_not = dyn_cast<Not>(expr)) {
17        return pe_not->getExpr();
18    }
19    return new Not(expr);
20}
21
22}
Note: See TracBrowser for help on using the repository browser.