In order to prevent the Python interpreter from running code that is
meant to be executed directly, the convention is to check the context
in which the code is being interpreted.
Add a check for the context stored in the `__name__` variable, and only
execute the cmpcodesize script if it is being run as a command-line
script (that is, `__main__`).
This script can:
*) Compare sizes of text sections (or other sections)
*) Compare sizes of function categories (Swift functions, Protocol Witnesses, Specializations, etc.)
*) Provide a detailed list or comparison of all functions
Use cmpcodesize -h to get info on the usage.
I copied the internals of Nadav's analyzeDylibSize script (Thanks!).
As the function of the analyzeDylibSize is now covered by this new script I deleted the old script.
Sorry that I implemented in ruby and not in python (I know ruby much better than python).
Swift SVN r25501