From 34bec837c9392212a5f0d47aa5b0ca593792d7f9 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 25 Nov 2014 03:49:50 +0000 Subject: [PATCH] CodeGen: further simplify assertion Use more of algorithm to simplify the assertion. Pointed out by David Blakie! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222721 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGCall.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index d012710bfe..6db753f168 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -446,10 +446,8 @@ CodeGenTypes::arrangeLLVMFunctionInfo(CanQualType resultType, ArrayRef argTypes, FunctionType::ExtInfo info, RequiredArgs required) { -#ifndef NDEBUG - for (const auto &AT : argTypes) - assert(AT.isCanonicalAsParam()); -#endif + assert(std::all_of(argTypes.begin(), argTypes.end(), + std::mem_fun_ref(&CanQualType::isCanonicalAsParam))); unsigned CC = ClangCallConvToLLVMCallConv(info.getCC()); -- 2.40.0