MCPcopy Create free account
hub / github.com/Kitware/CMake / AddLinkObject

Method AddLinkObject

Source/cmComputeLinkDepends.cxx:824–845  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

822}
823
824void 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
847void cmComputeLinkDepends::FollowLinkEntry(BFSEntry qe)
848{

Callers 1

AddLinkObjectsMethod · 0.95

Calls 2

AllocateLinkEntryMethod · 0.95
emplace_backMethod · 0.80

Tested by

no test coverage detected