| 388 | } |
| 389 | |
| 390 | void PlaceholderQueue::flush(BitcodeReaderMetadataList &MetadataList) { |
| 391 | while (!PHs.empty()) { |
| 392 | auto *MD = MetadataList.lookup(PHs.front().getID()); |
| 393 | assert(MD && "Flushing placeholder on unassigned MD"); |
| 394 | #ifndef NDEBUG |
| 395 | if (auto *MDN = dyn_cast<MDNode>(MD)) |
| 396 | assert(MDN->isResolved() && |
| 397 | "Flushing Placeholder while cycles aren't resolved"); |
| 398 | #endif |
| 399 | PHs.front().replaceUseWith(MD); |
| 400 | PHs.pop_front(); |
| 401 | } |
| 402 | } |
| 403 | |
| 404 | } // anonynous namespace |
| 405 |
no test coverage detected