[clang] a7a3568 - [NFC][Clang][CodeGen] Remove vestigial assertion (#127528)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 17 12:05:26 PST 2025
Author: Alex Voicu
Date: 2025-02-17T22:05:22+02:00
New Revision: a7a356833df81b605ecaa3b0a7391da68805b680
URL: https://github.com/llvm/llvm-project/commit/a7a356833df81b605ecaa3b0a7391da68805b680
DIFF: https://github.com/llvm/llvm-project/commit/a7a356833df81b605ecaa3b0a7391da68805b680.diff
LOG: [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.
Added:
Modified:
clang/lib/CodeGen/CGCall.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index e6c2ac939eb88..47bfd470dbafb 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -5633,22 +5633,6 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
if (!CallArgs.getCleanupsToDeactivate().empty())
deactivateArgCleanupsBeforeCall(*this, CallArgs);
- // Assert that the arguments we computed match up. The IR verifier
- // will catch this, but this is a common enough source of problems
- // during IRGen changes that it's way better for debugging to catch
- // it ourselves here.
-#ifndef NDEBUG
- assert(IRCallArgs.size() == IRFuncTy->getNumParams() || IRFuncTy->isVarArg());
- for (unsigned i = 0; i < IRCallArgs.size(); ++i) {
- // Inalloca argument can have
diff erent type.
- if (IRFunctionArgs.hasInallocaArg() &&
- i == IRFunctionArgs.getInallocaArgNo())
- continue;
- if (i < IRFuncTy->getNumParams())
- assert(IRCallArgs[i]->getType() == IRFuncTy->getParamType(i));
- }
-#endif
-
// Update the largest vector width if any arguments have vector types.
for (unsigned i = 0; i < IRCallArgs.size(); ++i)
LargestVectorWidth = std::max(LargestVectorWidth,
More information about the cfe-commits
mailing list