mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-03 00:01:39 +00:00
NFC: Fix a -Wsign-conversion warning
llvm-svn: 344564
This commit is contained in:
parent
632810a498
commit
d523a8bfd1
@ -112,14 +112,20 @@ struct DumpVisitor {
|
||||
printStr("}");
|
||||
--Depth;
|
||||
}
|
||||
|
||||
// Overload used when T is exactly 'bool', not merely convertible to 'bool'.
|
||||
template<typename T, T * = (bool*)nullptr>
|
||||
void print(T B) {
|
||||
printStr(B ? "true" : "false");
|
||||
void print(bool B) { printStr(B ? "true" : "false"); }
|
||||
|
||||
template <class T>
|
||||
typename std::enable_if<std::is_unsigned<T>::value>::type print(T N) {
|
||||
fprintf(stderr, "%llu", (unsigned long long)N);
|
||||
}
|
||||
void print(size_t N) {
|
||||
fprintf(stderr, "%zu", N);
|
||||
|
||||
template <class T>
|
||||
typename std::enable_if<std::is_signed<T>::value>::type print(T N) {
|
||||
fprintf(stderr, "%lld", (long long)N);
|
||||
}
|
||||
|
||||
void print(ReferenceKind RK) {
|
||||
switch (RK) {
|
||||
case ReferenceKind::LValue:
|
||||
|
Loading…
x
Reference in New Issue
Block a user