summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-11-25 03:49:50 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-11-25 03:49:50 +0000
commit32d1a96d6971cc3d076f5c2b38dd04bfbd6e369c (patch)
tree3604e77aeb8a04f7204b83eac7c9281bfb8d9436 /clang/lib/CodeGen
parent27ce577356a4689baef7f9b62b22a017bd25400b (diff)
downloadbcm5719-llvm-32d1a96d6971cc3d076f5c2b38dd04bfbd6e369c.tar.gz
bcm5719-llvm-32d1a96d6971cc3d076f5c2b38dd04bfbd6e369c.zip
CodeGen: further simplify assertion
Use more of algorithm to simplify the assertion. Pointed out by David Blakie! llvm-svn: 222721
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index d012710bfe6..6db753f1686 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -446,10 +446,8 @@ CodeGenTypes::arrangeLLVMFunctionInfo(CanQualType resultType,
ArrayRef<CanQualType> 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());
OpenPOWER on IntegriCloud