ysiraichi / enfield

An OpenQASM source-to-source Compiler.
GNU General Public License v2.0
20 stars 8 forks source link

Refactor `EFD_ABORT` so that it accept conditionals. #45

Closed ysiraichi closed 6 years ago

ysiraichi commented 6 years ago

Big commit that changes all instances of:

if (condition) {
    ERR << "Some error message. Culprit: " << culprit.toString() << "." << std::endl;
    EFD_ABORT();
}

to:

EfdAbortIf(condition, "Some error message. Culprit: " << culprit.toString() << ".");

with the same behaviour.