mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-30 20:34:21 +00:00
Add an optional LowerCase argument to hexdigit().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120213 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d420e7b76c
commit
4aeb489043
@ -25,10 +25,11 @@
|
||||
namespace llvm {
|
||||
template<typename T> class SmallVectorImpl;
|
||||
|
||||
/// hexdigit - Return the (uppercase) hexadecimal character for the
|
||||
/// hexdigit - Return the hexadecimal character for the
|
||||
/// given number \arg X (which should be less than 16).
|
||||
static inline char hexdigit(unsigned X) {
|
||||
return X < 10 ? '0' + X : 'A' + X - 10;
|
||||
static inline char hexdigit(unsigned X, bool LowerCase = false) {
|
||||
const char HexChar = LowerCase ? 'a' : 'A';
|
||||
return X < 10 ? '0' + X : HexChar + X - 10;
|
||||
}
|
||||
|
||||
/// utohex_buffer - Emit the specified number into the buffer specified by
|
||||
|
Loading…
x
Reference in New Issue
Block a user