diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-04-12 15:42:48 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-04-12 15:42:48 +0000 |
| commit | 5c323b833bd7187eb80e3c0de1c76f6cb45b8ff0 (patch) | |
| tree | e21f08c53cd43480f8dd9ff8453c2c6c0a0e7a90 | |
| parent | 6b841f18d37e8cdbefc51520b83d7026b7b6727d (diff) | |
| download | bcm5719-llvm-5c323b833bd7187eb80e3c0de1c76f6cb45b8ff0.tar.gz bcm5719-llvm-5c323b833bd7187eb80e3c0de1c76f6cb45b8ff0.zip | |
Replace llvm::array_endof with C++11's std::end.
No functionality change.
llvm-svn: 206111
| -rw-r--r-- | clang/lib/AST/ItaniumMangle.cpp | 6 | ||||
| -rw-r--r-- | clang/tools/diagtool/DiagnosticNames.cpp | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp index 5615647b0c6..24e643e1f2c 100644 --- a/clang/lib/AST/ItaniumMangle.cpp +++ b/clang/lib/AST/ItaniumMangle.cpp @@ -3455,7 +3455,7 @@ bool CXXNameMangler::mangleSubstitution(uintptr_t Ptr) { // <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(uintptr_t Ptr) { SeqID /= 36; } - Out << 'S' - << StringRef(BufferPtr, llvm::array_endof(Buffer)-BufferPtr) - << '_'; + Out << 'S' << StringRef(BufferPtr, std::end(Buffer) - BufferPtr) << '_'; } return true; diff --git a/clang/tools/diagtool/DiagnosticNames.cpp b/clang/tools/diagtool/DiagnosticNames.cpp index 155c62d80b2..f5df05905eb 100644 --- a/clang/tools/diagtool/DiagnosticNames.cpp +++ b/clang/tools/diagtool/DiagnosticNames.cpp @@ -53,8 +53,8 @@ const DiagnosticRecord &diagtool::getDiagnosticForID(short DiagID) { 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; |

