| 187 | } |
| 188 | |
| 189 | ASTDefNode *DebugInfoMap::getFromDefMap(const llvm::Instruction &I) const { |
| 190 | try { |
| 191 | IRNode Node(*const_cast<llvm::Instruction *>(&I)); |
| 192 | auto MacroIter = Macros.find(Node.getIndex()); |
| 193 | if (MacroIter != Macros.end()) |
| 194 | return Mapper->getASTDefNode(*const_cast<llvm::Instruction *>(&I)); |
| 195 | |
| 196 | auto DefMapIter = DefMap.find(Node.getIndex()); |
| 197 | if (DefMapIter == DefMap.end()) |
| 198 | return nullptr; |
| 199 | return DefMapIter->second.get(); |
| 200 | } catch (std::runtime_error &E) { |
| 201 | return nullptr; |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | ASTDefNode *DebugInfoMap::getFromGVMap(const llvm::GlobalValue &G) const { |
| 206 | IRNode Node(*const_cast<llvm::GlobalValue *>(&G)); |
nothing calls this directly
no test coverage detected