| 769 | } |
| 770 | |
| 771 | void registerDebugInfo(Attribute attr) { |
| 772 | TypeSwitch<Attribute, void>(attr) |
| 773 | .Case([&](DICompileUnitAttr diCompileUnit) { |
| 774 | getDebugInfoIndex(diCompileUnit.getFile()); |
| 775 | }) |
| 776 | .Case([&](DILexicalBlockAttr diLexicalBlock) { |
| 777 | getDebugInfoIndex(diLexicalBlock.getScope()); |
| 778 | getDebugInfoIndex(diLexicalBlock.getFile()); |
| 779 | }) |
| 780 | .Case([&](DILocAttr diLoc) { getDebugInfoIndex(diLoc.getScope()); }) |
| 781 | .Case([&](DISubprogramAttr diSubprogram) { |
| 782 | getDebugInfoIndex(diSubprogram.getFile()); |
| 783 | getDebugInfoIndex(diSubprogram.getCompileUnit()); |
| 784 | }) |
| 785 | .Case([&](CallSiteLoc callSiteLoc) { |
| 786 | getDebugInfoIndex(callSiteLoc.getCallee()); |
| 787 | getDebugInfoIndex(callSiteLoc.getCaller()); |
| 788 | }) |
| 789 | .Case([&](FusedLoc FusedLoc) { |
| 790 | for (auto subLoc : FusedLoc.getLocations()) |
| 791 | getDebugInfoIndex(subLoc); |
| 792 | }) |
| 793 | .Case( |
| 794 | [&](NameLoc nameLoc) { getDebugInfoIndex(nameLoc.getChildLoc()); }) |
| 795 | .Case([&](OpaqueLoc opaqueLoc) { |
| 796 | getDebugInfoIndex(opaqueLoc.getFallbackLocation()); |
| 797 | }) |
| 798 | .Default([](Attribute) {}); |
| 799 | } |
| 800 | |
| 801 | // di-compile-unit =: |
| 802 | // DebugTag[DICompileUnit] |
nothing calls this directly
no outgoing calls
no test coverage detected