r206111 - Replace llvm::array_endof with C++11's std::end.
Benjamin Kramer
benny.kra at googlemail.com
Sat Apr 12 08:42:48 PDT 2014
Author: d0k
Date: Sat Apr 12 10:42:48 2014
New Revision: 206111
URL: http://llvm.org/viewvc/llvm-project?rev=206111&view=rev
Log:
Replace llvm::array_endof with C++11's std::end.
No functionality change.
Modified:
cfe/trunk/lib/AST/ItaniumMangle.cpp
cfe/trunk/tools/diagtool/DiagnosticNames.cpp
Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumMangle.cpp?rev=206111&r1=206110&r2=206111&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ItaniumMangle.cpp (original)
+++ cfe/trunk/lib/AST/ItaniumMangle.cpp Sat Apr 12 10:42:48 2014
@@ -3455,7 +3455,7 @@ bool CXXNameMangler::mangleSubstitution(
// <seq-id> is encoded in base-36, using digits and upper case letters.
char Buffer[10];
- char *BufferPtr = llvm::array_endof(Buffer);
+ char *BufferPtr = std::end(Buffer);
if (SeqID == 0) *--BufferPtr = '0';
@@ -3468,9 +3468,7 @@ bool CXXNameMangler::mangleSubstitution(
SeqID /= 36;
}
- Out << 'S'
- << StringRef(BufferPtr, llvm::array_endof(Buffer)-BufferPtr)
- << '_';
+ Out << 'S' << StringRef(BufferPtr, std::end(Buffer) - BufferPtr) << '_';
}
return true;
Modified: cfe/trunk/tools/diagtool/DiagnosticNames.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/diagtool/DiagnosticNames.cpp?rev=206111&r1=206110&r2=206111&view=diff
==============================================================================
--- cfe/trunk/tools/diagtool/DiagnosticNames.cpp (original)
+++ cfe/trunk/tools/diagtool/DiagnosticNames.cpp Sat Apr 12 10:42:48 2014
@@ -53,8 +53,8 @@ const DiagnosticRecord &diagtool::getDia
DiagnosticRecord Key = {0, DiagID, 0};
const DiagnosticRecord *Result =
- std::lower_bound(BuiltinDiagnosticsByID,
- llvm::array_endof(BuiltinDiagnosticsByID),
+ std::lower_bound(std::begin(BuiltinDiagnosticsByID),
+ std::end(BuiltinDiagnosticsByID),
Key, orderByID);
assert(Result && "diagnostic not found; table may be out of date");
return *Result;
More information about the cfe-commits
mailing list