[PATCH] D40407: [COFF] Implement constructor priorities
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 27 14:10:06 PST 2017
ruiu added inline comments.
================
Comment at: lib/CodeGen/TargetLoweringObjectFileImpl.cpp:1233
+ Number << '.' << std::setw(5) << std::setfill('0') << (65535 - Priority);
+ Name += Number.str();
+ }
----------------
mstorsjo wrote:
> Do you have any suggestion on a more idiomatic way of doing the equivalent of `snprintf("%05u", 65535 - Priority)` here? This feels quite roundabout.
I think `snprintf` isn't actually bad. Alternatively, you could include `llvm/Support/Format.h` and do
Number << format("%05u", 65535 - Priority);
. Or you could keep the current code. I don't have a strong preference.
https://reviews.llvm.org/D40407
More information about the llvm-commits
mailing list