| 822 | } |
| 823 | |
| 824 | void cmComputeLinkDepends::AddLinkObject(cmLinkItem const& item) |
| 825 | { |
| 826 | assert(!item.Target); // The item is an object file, not its target. |
| 827 | |
| 828 | // Allocate a spot for the item entry. |
| 829 | auto lei = this->AllocateLinkEntry(item); |
| 830 | |
| 831 | // Check if the item entry has already been added. |
| 832 | if (!lei.second) { |
| 833 | return; |
| 834 | } |
| 835 | |
| 836 | // Initialize the item entry. |
| 837 | size_t index = lei.first->second; |
| 838 | LinkEntry& entry = this->EntryList[index]; |
| 839 | entry.Item = BT<std::string>(item.AsStr(), item.Backtrace); |
| 840 | entry.Kind = LinkEntry::Object; |
| 841 | entry.ObjectSource = item.ObjectSource; |
| 842 | |
| 843 | // Record explicitly linked object files separately. |
| 844 | this->ObjectEntries.emplace_back(index); |
| 845 | } |
| 846 | |
| 847 | void cmComputeLinkDepends::FollowLinkEntry(BFSEntry qe) |
| 848 | { |
no test coverage detected