r219935 - Use array_lengthof; NFC.
Hans Wennborg
hans at hanshq.net
Thu Oct 16 09:54:37 PDT 2014
Author: hans
Date: Thu Oct 16 11:54:36 2014
New Revision: 219935
URL: http://llvm.org/viewvc/llvm-project?rev=219935&view=rev
Log:
Use array_lengthof; NFC.
Modified:
cfe/trunk/tools/driver/driver.cpp
Modified: cfe/trunk/tools/driver/driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/driver.cpp?rev=219935&r1=219934&r2=219935&view=diff
==============================================================================
--- cfe/trunk/tools/driver/driver.cpp (original)
+++ cfe/trunk/tools/driver/driver.cpp Thu Oct 16 11:54:36 2014
@@ -246,7 +246,7 @@ static void ParseProgName(SmallVectorImp
bool FoundMatch = false;
size_t i;
- for (i = 0; i < sizeof(suffixes) / sizeof(suffixes[0]); ++i) {
+ for (i = 0; i < llvm::array_lengthof(suffixes); ++i) {
if (ProgNameRef.endswith(suffixes[i].Suffix)) {
FoundMatch = true;
SmallVectorImpl<const char *>::iterator it = ArgVector.begin();
More information about the cfe-commits
mailing list