(ty)
| 769 | |
| 770 | |
| 771 | def bitsOfEssentialType(ty): |
| 772 | if ty is None: |
| 773 | return 0 |
| 774 | last_type = ty.split(' ')[-1] |
| 775 | if last_type == 'Boolean': |
| 776 | return 1 |
| 777 | if last_type == 'char': |
| 778 | return typeBits['CHAR'] |
| 779 | if last_type == 'short': |
| 780 | return typeBits['SHORT'] |
| 781 | if last_type == 'int': |
| 782 | return typeBits['INT'] |
| 783 | if ty.endswith('long long'): |
| 784 | return typeBits['LONG_LONG'] |
| 785 | if last_type == 'long': |
| 786 | return typeBits['LONG'] |
| 787 | for sty in STDINT_TYPES: |
| 788 | if ty == sty: |
| 789 | return int(''.join(filter(str.isdigit, sty))) |
| 790 | return 0 |
| 791 | |
| 792 | |
| 793 | def get_function_pointer_type(tok): |
no test coverage detected