MCPcopy Create free account
hub / github.com/Samsung/UTopia / updateDefMap

Method updateDefMap

lib/astirmap/DebugInfoMap.cpp:350–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350void DebugInfoMap::updateDefMap(std::unique_ptr<ASTDefNode> ADN) {
351 if (!ADN)
352 return;
353
354 auto Loc = ADN->getLocIndex();
355 if (Loc.isExpandedFromMacro()) {
356 Macros.emplace(Loc);
357 return;
358 }
359
360 if (auto *CVD = getConstVarDecl(*ADN)) {
361 auto *Assigned = ADN->getAssigned();
362 assert(Assigned && "Unexpected Program State");
363 DefMap.emplace(Loc,
364 std::make_unique<ASTDefNode>(*CVD, Assigned->getASTUnit()));
365 return;
366 }
367
368 DefMap.emplace(Loc, std::move(ADN));
369}
370
371void DebugInfoMap::updateGVMap(std::unique_ptr<ASTDefNode> ADN) {
372 if (!ADN)

Callers

nothing calls this directly

Calls 3

getLocIndexMethod · 0.80
isExpandedFromMacroMethod · 0.80
getAssignedMethod · 0.80

Tested by

no test coverage detected