diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2017-12-28 16:58:54 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2017-12-28 16:58:54 +0000 |
| commit | 3a13ed60ba26194b8fce1f69d62c87835ca2dfb0 (patch) | |
| tree | 63e58f5dcc076c6988d1f2a62445f5b0d3346b65 /llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | |
| parent | b4c5c2dd15371ab1a1d33049a7f3ea7ac4c79da6 (diff) | |
| download | bcm5719-llvm-3a13ed60ba26194b8fce1f69d62c87835ca2dfb0.tar.gz bcm5719-llvm-3a13ed60ba26194b8fce1f69d62c87835ca2dfb0.zip | |
Avoid int to string conversion in Twine or raw_ostream contexts.
Some output changes from uppercase hex to lowercase hex, no other functionality change intended.
llvm-svn: 321526
Diffstat (limited to 'llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp')
| -rw-r--r-- | llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp index 2aa395642c4..753cfff4cda 100644 --- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp +++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp @@ -1797,11 +1797,7 @@ void NVPTXAsmPrinter::printFPConstant(const ConstantFP *Fp, raw_ostream &O) { llvm_unreachable("unsupported fp type"); APInt API = APF.bitcastToAPInt(); - std::string hexstr(utohexstr(API.getZExtValue())); - O << lead; - if (hexstr.length() < numHex) - O << std::string(numHex - hexstr.length(), '0'); - O << utohexstr(API.getZExtValue()); + O << lead << format_hex_no_prefix(API.getZExtValue(), numHex, /*Upper=*/true); } void NVPTXAsmPrinter::printScalarConstant(const Constant *CPV, raw_ostream &O) { |

