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

Method Add

Source/CTest/cmCTestMultiProcessHandler.cxx:1309–1335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1307};
1308
1309bool BacktraceData::Add(cmListFileBacktrace const& bt, Json::ArrayIndex& index)
1310{
1311 if (bt.Empty()) {
1312 return false;
1313 }
1314 cmListFileContext const* top = &bt.Top();
1315 auto found = this->NodeMap.find(top);
1316 if (found != this->NodeMap.end()) {
1317 index = found->second;
1318 return true;
1319 }
1320 Json::Value entry = Json::objectValue;
1321 entry["file"] = this->AddFile(top->FilePath);
1322 if (top->Line) {
1323 entry["line"] = static_cast<int>(top->Line);
1324 }
1325 if (!top->Name.empty()) {
1326 entry["command"] = this->AddCommand(top->Name);
1327 }
1328 Json::ArrayIndex parent;
1329 if (this->Add(bt.Pop(), parent)) {
1330 entry["parent"] = parent;
1331 }
1332 index = this->NodeMap[top] = this->Nodes.size();
1333 this->Nodes.append(std::move(entry)); // NOLINT(*)
1334 return true;
1335}
1336
1337Json::Value BacktraceData::Dump()
1338{

Callers 6

AddBacktraceFunction · 0.45
generateDataTarMethod · 0.45
generateControlTarMethod · 0.45
generateDebMethod · 0.45
PackageFilesMethod · 0.45

Calls 10

AddFileMethod · 0.95
AddCommandMethod · 0.95
moveFunction · 0.85
EmptyMethod · 0.80
appendMethod · 0.80
findMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
PopMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected