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

Method getFromDefMap

lib/astirmap/DebugInfoMap.cpp:189–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189ASTDefNode *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
205ASTDefNode *DebugInfoMap::getFromGVMap(const llvm::GlobalValue &G) const {
206 IRNode Node(*const_cast<llvm::GlobalValue *>(&G));

Callers

nothing calls this directly

Calls 4

endMethod · 0.80
findMethod · 0.45
getASTDefNodeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected