| 160 | } |
| 161 | |
| 162 | void BVDataPTAImpl::writeObjVarToFile(const string& filename) |
| 163 | { |
| 164 | outs() << "Storing ObjVar to '" << filename << "'..."; |
| 165 | error_code err; |
| 166 | std::fstream f(filename.c_str(), std::ios_base::out); |
| 167 | if (!f.good()) |
| 168 | { |
| 169 | outs() << " error opening file for writing!\n"; |
| 170 | return; |
| 171 | } |
| 172 | |
| 173 | // Write BaseNodes insensitivity to file |
| 174 | NodeBS NodeIDs; |
| 175 | for (auto it = pag->begin(), ie = pag->end(); it != ie; ++it) |
| 176 | { |
| 177 | PAGNode* pagNode = it->second; |
| 178 | if (!isa<ObjVar>(pagNode)) continue; |
| 179 | NodeID n = pag->getBaseObjVarID(it->first); |
| 180 | if (NodeIDs.test(n)) continue; |
| 181 | f << n << " "; |
| 182 | f << isFieldInsensitive(n) << "\n"; |
| 183 | NodeIDs.set(n); |
| 184 | } |
| 185 | |
| 186 | f << "------\n"; |
| 187 | |
| 188 | f.close(); |
| 189 | if (f.good()) |
| 190 | { |
| 191 | outs() << "\n"; |
| 192 | return; |
| 193 | } |
| 194 | |
| 195 | |
| 196 | } |
| 197 | |
| 198 | void BVDataPTAImpl::writePtsResultToFile(std::fstream& f) |
| 199 | { |
no test coverage detected