| 369 | } |
| 370 | |
| 371 | void DebugInfoMap::updateGVMap(std::unique_ptr<ASTDefNode> ADN) { |
| 372 | if (!ADN) |
| 373 | return; |
| 374 | |
| 375 | auto *D = ADN->getAssignee().getNode().get<VarDecl>(); |
| 376 | if (!D) |
| 377 | return; |
| 378 | |
| 379 | auto LinkScope = D->getFormalLinkage(); |
| 380 | DebugInfoMap::GVMapKey Key = {.Path = "", .Name = D->getName().str()}; |
| 381 | if (LinkScope == NoLinkage || LinkScope == InternalLinkage) { |
| 382 | Key.Path = ADN->getLocIndex().getPath(); |
| 383 | } |
| 384 | GVMap.emplace(Key, std::move(ADN)); |
| 385 | } |
| 386 | |
| 387 | bool DebugInfoMap::updateMacro(SourceLocation Loc, clang::ASTUnit &Unit) { |
| 388 | auto &SrcManager = Unit.getSourceManager(); |
nothing calls this directly
no test coverage detected