This patch adds a data formatter for NSDecimalNumber. The latter is a Foundation object used for representing and performing arithmetic on base-10 numbers that bridges to Decimal.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
source/Plugins/Language/ObjC/Cocoa.cpp | ||
---|---|---|
462 ↗ | (On Diff #151096) | Side note: It would be slightly faster/elegant to use a StringRef instead of the char* for the comparisons. |
639 ↗ | (On Diff #151096) | Since the whole structure is one packed bitfield, an alternative implementation would be to read all 16b at once and memcpy to a local variable bitfield and let the compiler do the unpacking; that might be shorter. This version seems fine, too. |
Comment Actions
I didn't check whether the representation was correct (although it looks lo). The structure of the patch looks fine to me, thanks for adding the comments :)
Comment Actions
This looks fine to me. Nothing in the TypeSummaryOptions is relevant to printing these numbers, so it's correct to ignore them.