]> granicus.if.org Git - clang/commitdiff
Use array_lengthof; NFC.
authorHans Wennborg <hans@hanshq.net>
Thu, 16 Oct 2014 16:54:36 +0000 (16:54 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 16 Oct 2014 16:54:36 +0000 (16:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219935 91177308-0d34-0410-b5e6-96231b3b80d8

tools/driver/driver.cpp

index db356b76e3656a8a94968299fee497e713a01fc3..3e98b2c6c956b137658e97cb76f0fcfd04aca553 100644 (file)
@@ -246,7 +246,7 @@ static void ParseProgName(SmallVectorImpl<const char *> &ArgVector,
     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();