]> granicus.if.org Git - clang/commitdiff
Replace Count{Leading,Trailing}Zeros_{32,64} with count{Leading,Trailing}Zeros.
authorMichael J. Spencer <bigcheesegs@gmail.com>
Fri, 24 May 2013 21:42:04 +0000 (21:42 +0000)
committerMichael J. Spencer <bigcheesegs@gmail.com>
Fri, 24 May 2013 21:42:04 +0000 (21:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182675 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Type.cpp
lib/Basic/SourceManager.cpp
lib/Lex/Lexer.cpp

index 639ae186c142f6f27b347cfdd25ccd7af4bfb433..c32df11b66777c72ae461b847087e72bc08ae348 100644 (file)
@@ -93,7 +93,7 @@ unsigned ConstantArrayType::getNumAddressingBits(ASTContext &Context,
   if ((ElementSize >> 32) == 0 && NumElements.getBitWidth() <= 64 &&
       (NumElements.getZExtValue() >> 32) == 0) {
     uint64_t TotalSize = NumElements.getZExtValue() * ElementSize;
-    return 64 - llvm::CountLeadingZeros_64(TotalSize);
+    return 64 - llvm::countLeadingZeros(TotalSize);
   }
 
   // Otherwise, use APSInt to handle arbitrary sized values.
index 6994b3009399d09e0e688933df3d6430a0578562..9cfa5b9f4528207bb68b6395301de83b496500e0 100644 (file)
@@ -1258,7 +1258,7 @@ static void ComputeLineNumbers(DiagnosticsEngine &Diag, ContentCache *FI,
 
       // If we found a newline, adjust the pointer and jump to the handling code.
       if (Mask != 0) {
-        NextBuf += llvm::CountTrailingZeros_32(Mask);
+        NextBuf += llvm::countTrailingZeros(Mask);
         goto FoundSpecialChar;
       }
       NextBuf += 16;
index e3daf346926f5c974b02447a3c96d3d9c71795de..9505ccd97223a0d055ad55e549cf784de03e2751 100644 (file)
@@ -2195,7 +2195,7 @@ bool Lexer::SkipBlockComment(Token &Result, const char *CurPtr) {
           // Adjust the pointer to point directly after the first slash. It's
           // not necessary to set C here, it will be overwritten at the end of
           // the outer loop.
-          CurPtr += llvm::CountTrailingZeros_32(cmp) + 1;
+          CurPtr += llvm::countTrailingZeros<unsigned>(cmp) + 1;
           goto FoundSlash;
         }
         CurPtr += 16;