19 template<
typename T, std::
size_t N>
22 char *CurPtr = EndPtr;
25 *--CurPtr =
'0' + char(Value % 10);
28 return EndPtr - CurPtr;
35 int InitialDigits = ((Buffer.
size() - 1) % 3) + 1;
37 S.
write(ThisGroup.data(), ThisGroup.size());
41 while (!Buffer.
empty()) {
44 S.
write(ThisGroup.data(), 3);
52 static_assert(std::is_unsigned<T>::value,
"Value is not unsigned!");
54 char NumberBuffer[128];
55 std::memset(NumberBuffer,
'0',
sizeof(NumberBuffer));
64 for (
size_t I = Len;
I < MinDigits; ++
I)
79 if (N == static_cast<uint32_t>(N))
89 static_assert(std::is_signed<T>::value,
"Value is not signed!");
91 using UnsignedT =
typename std::make_unsigned<T>::type;
98 UnsignedT UN = -(UnsignedT)N;
134 const size_t kMaxWidth = 128u;
143 unsigned PrefixChars = Prefix ? 2 : 0;
145 std::max(static_cast<unsigned>(W), std::max(1u, Nibbles) + PrefixChars);
147 char NumberBuffer[kMaxWidth];
150 NumberBuffer[1] =
'x';
151 char *EndPtr = NumberBuffer + NumChars;
152 char *CurPtr = EndPtr;
154 unsigned char x =
static_cast<unsigned char>(
N) % 16;
159 S.
write(NumberBuffer, NumChars);
169 }
else if (std::isinf(N)) {
184 Out <<
"%." << Prec << Letter;
191 #if defined(__MINGW32__)
193 if (N == 0.0 && std::signbit(N)) {
194 char NegativeZero[] =
"-0.000000e+00";
196 NegativeZero[strlen(NegativeZero) - 4] =
'E';
201 int fpcl = _fpclass(N);
204 if (fpcl == _FPCLASS_NZ) {
205 char NegativeZero[] =
"-0.000000e+00";
207 NegativeZero[strlen(NegativeZero) - 4] =
'E';
215 len =
format(Spec.
c_str(),
N).snprint(buf,
sizeof(buf));
216 if (len <=
sizeof(buf) - 2) {
217 if (len >= 5 && (buf[len - 5] ==
'e' || buf[len - 5] ==
'E') &&
218 buf[len - 3] ==
'0') {
219 int cs = buf[len - 4];
220 if (cs ==
'+' || cs ==
'-') {
221 int c1 = buf[len - 2];
222 int c0 = buf[len - 1];
223 if (isdigit(static_cast<unsigned char>(c1)) &&
224 isdigit(static_cast<unsigned char>(c0))) {
261 LLVM_BUILTIN_UNREACHABLE;
const_iterator end(StringRef path)
Get end iterator over path.
constexpr T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION
A raw_ostream that writes to an SmallVector or SmallString.
std::size_t countLeadingZeros(T Val, ZeroBehavior ZB=ZB_Width)
Count number of 0's from the most significant bit to the least stopping at the first 1...
void write_double(raw_ostream &S, double D, FloatStyle Style, Optional< size_t > Precision=None)
size_t getDefaultPrecision(FloatStyle Style)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
bool isPrefixedHexStyle(HexPrintStyle S)
size_t size() const
size - Get the array size.
Maximum length of the test input libFuzzer tries to guess a good value based on the corpus and reports it always prefer smaller inputs during the corpus shuffle When libFuzzer itself reports a bug this exit code will be used If indicates the maximal total time in seconds to run the fuzzer minimizes the provided crash input Use with etc Experimental Use value profile to guide fuzzing Number of simultaneous worker processes to run the jobs If min(jobs, NumberOfCpuCores()/2)\" is used.") FUZZER_FLAG_INT(reload
format_object< Ts...> format(const char *Fmt, const Ts &...Vals)
These are helper functions used to produce formatted output.
ArrayRef< T > take_front(size_t N=1) const
Return a copy of *this with only the first N elements.
bool empty() const
empty - Check if the array is empty.
raw_ostream & write(unsigned char C)
constexpr size_t array_lengthof(T(&)[N])
Find the length of an array.
static char hexdigit(unsigned X, bool LowerCase=false)
hexdigit - Return the hexadecimal character for the given number X (which should be less than 16)...
void write_hex(raw_ostream &S, uint64_t N, HexPrintStyle Style, Optional< size_t > Width=None)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArrayRef< T > drop_front(size_t N=1) const
Drop the first N elements of the array.
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream...
void write_integer(raw_ostream &S, unsigned int N, size_t MinDigits, IntegerStyle Style)