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

Method hasDiffNumArgs

lib/astirmap/DebugInfoMap.cpp:77–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77bool DebugInfoMap::hasDiffNumArgs(const llvm::CallBase &CB) const {
78 auto *ACN = getFromCallMap(CB);
79 if (!ACN)
80 throw std::runtime_error("CallNode not found");
81
82 const auto *E = ACN->getNode().get<Expr>();
83 if (!E)
84 throw std::runtime_error("CallNode has non Expr Node");
85
86 unsigned ASTArgNum = 0;
87 try {
88 ASTArgNum = util::getArgExprs(*const_cast<Expr *>(E)).size();
89 } catch (std::invalid_argument &E) {
90 throw std::runtime_error("CallNode has non CallExpr Node");
91 }
92 auto IRArgNum = CB.getNumArgOperands() - getDiffNumArgs(CB);
93 return ASTArgNum != IRArgNum;
94}
95
96bool DebugInfoMap::ArgMapKey::operator<(const struct ArgMapKey &Key) const {
97 if (E != Key.E)

Callers 2

analyzeTargetCallMethod · 0.80
TEST_FFunction · 0.80

Calls 2

getArgExprsFunction · 0.85
sizeMethod · 0.80

Tested by 1

TEST_FFunction · 0.64