From: Saleem Abdulrasool Date: Tue, 25 Nov 2014 03:49:50 +0000 (+0000) Subject: CodeGen: further simplify assertion X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=32d1a96d6971cc3d076f5c2b38dd04bfbd6e369c;p=platform%2Fupstream%2Fllvm.git CodeGen: further simplify assertion Use more of algorithm to simplify the assertion. Pointed out by David Blakie! llvm-svn: 222721 --- diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index d012710..6db753f 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/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());