zturner added inline comments.
================ Comment at: unittests/tools/lldb-server/tests/MessageObjects.cpp:167 + std::stringstream ss; + ss << std::hex << std::setw(2) << std::setfill('0') << register_id; + std::string hex_id = ss.str(); ---------------- jmajors wrote: > zturner wrote: > > Is this the same as `std::string hex_id = llvm::utostr(register_id);`? > No. The register IDs are all two nibbles wide, so I need the setw & setfill > (or equivalent). Bear with me here, I'm //determined// to kill this `stringstream` ;-) How about `std::string hex_id = llvm::formatv("{0:x-2}", register_id);` ``` x = lowercase hex. - means don't print the `0x` prefix. 2 means print at least 2 digits. ``` https://reviews.llvm.org/D32930 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits