This is an archive of the discontinued LLVM Phabricator instance.

Remove the state_types array
ClosedPublic

Authored by ed on Mar 16 2015, 12:06 PM.

Details

Summary

If we want to add support for making std::cin and std::cout optional, it is impractical to have all of the mbstate_t objects in one array. This would mean that if std::cin and std::cout are omitted, the state_types array is only used partially.

Solve this by using separate global variables. These are placed right next to the iostream object and the buffer, meaning we can easily #ifdef them away.

Diff Detail

Repository
rL LLVM

Event Timeline

ed updated this revision to Diff 22038.Mar 16 2015, 12:06 PM
ed retitled this revision from to Remove the state_types array.
ed updated this object.
ed edited the test plan for this revision. (Show Details)
ed added reviewers: jroelofs, mclow.lists, EricWF.
ed set the repository for this revision to rL LLVM.
ed added a subscriber: Unknown Object (MLST).
This revision was automatically updated to reflect the committed changes.
jroelofs edited edge metadata.Mar 26 2015, 7:57 AM

Hi @ed,

This looks fine, but as a reminder of the developer policy: http://llvm.org/docs/DeveloperPolicy.html#id11 the right thing to do is to ping your patches weekly until you get feedback or a "LGTM", rather than committing them after the review has gone stagnant. Pinging helps remind us about the reviews... sorry I forgot about yours.

Cheers,

Jon

ed added a comment.EditedMar 26 2015, 8:42 AM

This looks fine, but as a reminder of the developer policy: http://llvm.org/docs/DeveloperPolicy.html#id11 the right thing to do is to ping your patches weekly until you get feedback or a "LGTM", rather than committing them after the review has gone stagnant. Pinging helps remind us about the reviews... sorry I forgot about yours.

And sorry from my side for being a bit impatient. I should have pinged. :-)