| 348 | } |
| 349 | |
| 350 | void 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 | |
| 371 | void DebugInfoMap::updateGVMap(std::unique_ptr<ASTDefNode> ADN) { |
| 372 | if (!ADN) |
nothing calls this directly
no test coverage detected