[PATCH] D90265: [llvm][StringExtras] Add a fail-able version of `fromHex` and optimize hex digit lookup

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 20:44:12 PDT 2020


mehdi_amini added a comment.

This LGTM, added some other reviewers for "added entropy" purpose if possible.



================
Comment at: llvm/include/llvm/ADT/StringExtras.h:197
 
-inline uint8_t hexFromNibbles(char MSB, char LSB) {
+inline bool tryGetHexFromNibbles(char MSB, char LSB, uint8_t &Hex) {
   unsigned U1 = hexDigitValue(MSB);
----------------
Can you document the API?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90265/new/

https://reviews.llvm.org/D90265



More information about the llvm-commits mailing list