--------------------------------------------------------------
| 711 | |
| 712 | // -------------------------------------------------------------- |
| 713 | void |
| 714 | Variable::Output(std::ostream &out) const |
| 715 | { |
| 716 | if (is_volatile() && CGOptions::wrap_volatiles()) { |
| 717 | out << "VOL_RVAL(" << get_actual_name() << ", "; |
| 718 | type->Output(out); |
| 719 | out << ")"; |
| 720 | } |
| 721 | else if (CGOptions::access_once() && isAccessOnce && !isAddrTaken) { |
| 722 | assert(CGOptions::access_once() && "access_once is disabled!"); |
| 723 | out << "ACCESS_ONCE(" << get_actual_name() << ")"; |
| 724 | } |
| 725 | else { |
| 726 | out << get_actual_name(); |
| 727 | } |
| 728 | } |
| 729 | |
| 730 | // -------------------------------------------------------------- |
| 731 | // This function is a bit of hack, because --- |