| 1081 | } |
| 1082 | |
| 1083 | int |
| 1084 | Variable::output_volatile_fprintf(ostream &out, int indent, const string &name, |
| 1085 | const string &sizeof_string, const string &fp_string) const |
| 1086 | { |
| 1087 | std::string sz_symbol; |
| 1088 | std::string mach = CGOptions::vol_tests_mach(); |
| 1089 | std::string pointer_str; |
| 1090 | |
| 1091 | if (is_pointer()) |
| 1092 | pointer_str = "pointer"; |
| 1093 | else |
| 1094 | pointer_str = "non-pointer"; |
| 1095 | |
| 1096 | if (!mach.compare("x86")) { |
| 1097 | sz_symbol = "d"; |
| 1098 | } |
| 1099 | else if (!mach.compare("x86_64")) { |
| 1100 | sz_symbol = "ld"; |
| 1101 | } |
| 1102 | else { |
| 1103 | assert("invalid mach!" && 0); |
| 1104 | } |
| 1105 | |
| 1106 | std::string str = "fprintf(" + fp_string + ", \"" + name + "; %p; %" + sz_symbol + "; " + pointer_str + "\\n\", "; |
| 1107 | str += name; |
| 1108 | str += ", "; |
| 1109 | |
| 1110 | str += sizeof_string; |
| 1111 | str += ");"; |
| 1112 | output_tab(out, indent); |
| 1113 | out << str; |
| 1114 | outputln(out); |
| 1115 | |
| 1116 | return 0; |
| 1117 | } |
| 1118 | |
| 1119 | bool |
| 1120 | Variable::is_seen_name(vector<std::string> &seen_names, const std::string &name) const |
nothing calls this directly
no test coverage detected