| 75 | } |
| 76 | |
| 77 | bool 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 | |
| 96 | bool DebugInfoMap::ArgMapKey::operator<(const struct ArgMapKey &Key) const { |
| 97 | if (E != Key.E) |