This is an archive of the discontinued LLVM Phabricator instance.

BumpPtrAllocator: don't accept 0 for the alignment parameter
ClosedPublic

Authored by hans on Aug 17 2014, 12:40 PM.

Details

Reviewers
majnemer
Summary

It seems unnecessary to have to use an extra branch to check for this special case.

I couldn't measure any performance difference. Perhaps Clang inlines and removes the check most of the time, but I still think it's worth fixing.

Diff Detail

Event Timeline

hans updated this revision to Diff 12592.Aug 17 2014, 12:40 PM
hans retitled this revision from to BumpPtrAllocator: don't accept 0 for the alignment parameter.
hans updated this object.
hans edited the test plan for this revision. (Show Details)
hans added a reviewer: majnemer.
hans added subscribers: Unknown Object (MLST), hansw.
majnemer accepted this revision.Aug 19 2014, 3:44 PM
majnemer edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Aug 19 2014, 3:44 PM
hans closed this revision.Aug 21 2014, 10:20 AM

This was committed in r216036.