comparison lib/MC/MCInstPrinter.cpp @ 83:60c9769439b8 LLVM3.7

LLVM 3.7
author Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
date Wed, 18 Feb 2015 14:55:36 +0900
parents 95c75e76d11b
children afa8332a0e37
comparison
equal deleted inserted replaced
78:af83660cff7b 83:60c9769439b8
67 Value <<= 4; 67 Value <<= 4;
68 } 68 }
69 return false; 69 return false;
70 } 70 }
71 71
72 format_object1<int64_t> MCInstPrinter::formatDec(const int64_t Value) const { 72 format_object<int64_t> MCInstPrinter::formatDec(int64_t Value) const {
73 return format("%" PRId64, Value); 73 return format("%" PRId64, Value);
74 } 74 }
75 75
76 format_object1<int64_t> MCInstPrinter::formatHex(const int64_t Value) const { 76 format_object<int64_t> MCInstPrinter::formatHex(int64_t Value) const {
77 switch(PrintHexStyle) { 77 switch(PrintHexStyle) {
78 case HexStyle::C: 78 case HexStyle::C:
79 if (Value < 0) 79 if (Value < 0)
80 return format("-0x%" PRIx64, -Value); 80 return format("-0x%" PRIx64, -Value);
81 else 81 else
94 } 94 }
95 } 95 }
96 llvm_unreachable("unsupported print style"); 96 llvm_unreachable("unsupported print style");
97 } 97 }
98 98
99 format_object1<uint64_t> MCInstPrinter::formatHex(const uint64_t Value) const { 99 format_object<uint64_t> MCInstPrinter::formatHex(uint64_t Value) const {
100 switch(PrintHexStyle) { 100 switch(PrintHexStyle) {
101 case HexStyle::C: 101 case HexStyle::C:
102 return format("0x%" PRIx64, Value); 102 return format("0x%" PRIx64, Value);
103 case HexStyle::Asm: 103 case HexStyle::Asm:
104 if (needsLeadingZero(Value)) 104 if (needsLeadingZero(Value))