Improve ScopedPrinter::printNumber? (was: [llvm] r313816 - [llvm-readobj] Fix 'Teach readobj to dump .res files'.)

Seeing the below commit, I wondered whether that's a genuine fix or rather a workaround for a shortcoming in llvm::ScopedPrinter::printNumber.

The latter has overloads for [u]int{8,16,32,64}_t, presumably so that it can take arguments of arbitrary integer types. However, at least on recent macOS uint64_t is 'unsigned long long' (and uint32_t is 'unsigned int') while size_t is 'unsigned long', so there's no best matching overload.

Would it thus be better to change the ScopedPrinter::printNumber to be overloaded on all the "raw" integer types, instead of the stdint.h typedefs?

I don’t have access to the source at the moment, but it could also just be templated. Not sure which approach is best