diff options
Diffstat (limited to 'llvm/include/llvm/Demangle/Utility.h')
-rw-r--r-- | llvm/include/llvm/Demangle/Utility.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/llvm/include/llvm/Demangle/Utility.h b/llvm/include/llvm/Demangle/Utility.h index 4fea9351a4bf..bec019da8680 100644 --- a/llvm/include/llvm/Demangle/Utility.h +++ b/llvm/include/llvm/Demangle/Utility.h @@ -1,3 +1,5 @@ +// Do not edit! -*- read-only -*- +// See README.txt for instructions //===--- Utility.h ----------------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. @@ -10,14 +12,15 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_DEMANGLE_UTILITY_H -#define LLVM_DEMANGLE_UTILITY_H +#ifndef DEMANGLE_UTILITY_H +#define DEMANGLE_UTILITY_H #include "StringView.h" +#include <array> #include <cstdint> #include <cstdlib> #include <cstring> -#include <iterator> +#include <exception> #include <limits> DEMANGLE_NAMESPACE_BEGIN @@ -48,8 +51,8 @@ class OutputBuffer { return; } - char Temp[21]; - char *TempPtr = std::end(Temp); + std::array<char, 21> Temp; + char *TempPtr = Temp.data() + Temp.size(); while (N) { *--TempPtr = char('0' + N % 10); @@ -59,7 +62,7 @@ class OutputBuffer { // Add negative sign... if (isNeg) *--TempPtr = '-'; - this->operator<<(StringView(TempPtr, std::end(Temp))); + this->operator<<(StringView(TempPtr, Temp.data() + Temp.size())); } public: |