Skip to content

Commit a7a3568

Browse files
authored
[NFC][Clang][CodeGen] Remove vestigial assertion (#127528)
This removes a vestigial assertion, which would erroneously trigger even though we now correctly handle valid arg mismatches (<https://github.com/llvm/llvm-project/blob/2dda529838e622e7a79b1e26d2899f319fd7e379/clang/lib/CodeGen/CGCall.cpp#L5397>), after #114062 went in.
1 parent 3fa85c7 commit a7a3568

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

clang/lib/CodeGen/CGCall.cpp

-16
Original file line numberDiff line numberDiff line change
@@ -5633,22 +5633,6 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
56335633
if (!CallArgs.getCleanupsToDeactivate().empty())
56345634
deactivateArgCleanupsBeforeCall(*this, CallArgs);
56355635

5636-
// Assert that the arguments we computed match up. The IR verifier
5637-
// will catch this, but this is a common enough source of problems
5638-
// during IRGen changes that it's way better for debugging to catch
5639-
// it ourselves here.
5640-
#ifndef NDEBUG
5641-
assert(IRCallArgs.size() == IRFuncTy->getNumParams() || IRFuncTy->isVarArg());
5642-
for (unsigned i = 0; i < IRCallArgs.size(); ++i) {
5643-
// Inalloca argument can have different type.
5644-
if (IRFunctionArgs.hasInallocaArg() &&
5645-
i == IRFunctionArgs.getInallocaArgNo())
5646-
continue;
5647-
if (i < IRFuncTy->getNumParams())
5648-
assert(IRCallArgs[i]->getType() == IRFuncTy->getParamType(i));
5649-
}
5650-
#endif
5651-
56525636
// Update the largest vector width if any arguments have vector types.
56535637
for (unsigned i = 0; i < IRCallArgs.size(); ++i)
56545638
LargestVectorWidth = std::max(LargestVectorWidth,

0 commit comments

Comments
 (0)