This is an archive of the discontinued LLVM Phabricator instance.

Fix private constructor for ScaledNumber.
ClosedPublic

Authored by dnovillo on Apr 29 2015, 1:32 PM.

Details

Summary

It was using uint64_t instead of DigitsT. This was preventing
instantiations of ScaledNumber with anything other than uint64_t types.

In implementing the tests, I ran into another issue. Operators >>= and
<<= did not have variants for accepting other ScaledNumber as the shift
argument. This is expected by the SCALED_NUMBER_BOP.

I'm not sure it makes sense to allow shifting a ScaledNumber by another
ScaledNumber, so I generated a new template for shifting ScaledNumbers
using a new macro SCALED_NUMBER_SHIFT.

Diff Detail

Repository
rL LLVM

Event Timeline

dnovillo updated this revision to Diff 24655.Apr 29 2015, 1:32 PM
dnovillo retitled this revision from to Fix private constructor for ScaledNumber..
dnovillo updated this object.
dnovillo edited the test plan for this revision. (Show Details)
dnovillo added a reviewer: dexonsmith.
dnovillo added a subscriber: Unknown Object (MLST).
This revision was automatically updated to reflect the committed changes.