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

Function getIRFunction

lib/utils/IRUtil.cpp:10–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8
9namespace util {
10const llvm::Function *getIRFunction(const llvm::Module &M,
11 const clang::NamedDecl *ND) {
12 if (!ND)
13 return nullptr;
14
15 // NOTE: Unexpected when multiple functions are matched by one clang
16 // NamedDecl.
17 for (const auto &MangledName : util::getMangledNames(*ND)) {
18 const auto *F = M.getFunction(MangledName);
19 if (F)
20 return F;
21 }
22 return nullptr;
23}
24
25} // namespace util
26} // namespace ftg

Callers 2

Calls 2

getMangledNamesFunction · 0.85
getFunctionMethod · 0.80

Tested by 1