This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Simplify initialization and flags
ClosedPublic

Authored by cryptoad on Nov 13 2017, 1:08 PM.

Details

Summary

This is mostly some cleanup and shouldn't affect functionalities.

Reviewing some code for a future addition, I realized that the complexity of
the initialization path was unnecessary, and so was maintaining a structure
for the allocator options throughout the initialization.

So we get rid of that structure, of an extraneous level of nesting for the
init function, and correct a couple of related code inaccuracies in the
flags cpp.

Event Timeline

cryptoad created this revision.Nov 13 2017, 1:08 PM
cryptoad updated this revision to Diff 122711.Nov 13 2017, 1:12 PM

Move initFlags higher as dieWithMessage checks
common_flags()->abort_on_error.

alekseyshl accepted this revision.Nov 13 2017, 5:38 PM
This revision is now accepted and ready to land.Nov 13 2017, 5:38 PM
cryptoad updated this revision to Diff 122847.Nov 14 2017, 8:09 AM

Reordering some lines to group the common_flags() calls together and the
getFlags() calls together.

cryptoad closed this revision.Nov 14 2017, 8:14 AM