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

Method getASTNode

lib/astirmap/CalledFunctionMacroMapper.cpp:75–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75ASTNode *CalledFunctionMacroMapper::getASTNode(llvm::CallBase &CB) {
76 auto *CF = util::getCalledFunction(CB);
77 if (!CF)
78 return nullptr;
79
80 IRNode Node(CB);
81 const auto &Index = Node.getIndex();
82 DBKey Key(Index.getPath(), Index.getLine(), Index.getColumn(),
83 CF->getName().str());
84 if (DupKey.find(Key) != DupKey.end())
85 return nullptr;
86
87 auto Acc = CallMap.find(Key);
88 if (Acc == CallMap.end())
89 return nullptr;
90 return Acc->second.get();
91}
92
93ASTDefNode *CalledFunctionMacroMapper::getASTDefNode(llvm::Instruction &I) {
94 auto *CB = dyn_cast<llvm::CallBase>(&I);

Callers 1

getFromCallMapMethod · 0.80

Calls 8

getCalledFunctionFunction · 0.85
getPathMethod · 0.80
getColumnMethod · 0.80
endMethod · 0.80
getLineMethod · 0.45
getNameMethod · 0.45
findMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected