parameters: (val)
return_statement: return (pointer, value)
docstring: Get tuple from llvm::PointerIntPair.
docstring_summary: Get tuple from llvm::PointerIntPair.
docstring_tokens: Get tuple from llvm :: PointerIntPair .
function: def get_pointer_int_pair(val):
    """Get tuple from llvm::PointerIntPair."""
    info_name = val.type.template_argument(4).strip_typedefs().name
    # Note: this throws a gdb.error if the info type is not used (by means of a
    # call to getPointer() or similar) in the current translation unit.
    enum_type = gdb.lookup_type(info_name + '::MaskAndShiftConstants')
    enum_dict = gdb.types.make_enum_dict(enum_type)
    ptr_mask = enum_dict[info_name + '::PointerBitMask']
    int_shift = enum_dict[info_name + '::IntShift']
    int_mask = enum_dict[info_name + '::IntMask']
    pair_union = val['Value']
    pointer = (pair_union & ptr_mask)
    value = ((pair_union >> int_shift) & int_mask)
    return (pointer, value)
function_tokens: def get_pointer_int_pair ( val ) : info_name = val . type . template_argument ( 4 ) . strip_typedefs ( ) . name # Note: this throws a gdb.error if the info type is not used (by means of a # call to getPointer() or similar) in the current translation unit. enum_type = gdb . lookup_type ( info_name + '::MaskAndShiftConstants' ) enum_dict = gdb . types . make_enum_dict ( enum_type ) ptr_mask = enum_dict [ info_name + '::PointerBitMask' ] int_shift = enum_dict [ info_name + '::IntShift' ] int_mask = enum_dict [ info_name + '::IntMask' ] pair_union = val [ 'Value' ] pointer = ( pair_union & ptr_mask ) value = ( ( pair_union >> int_shift ) & int_mask ) return ( pointer , value )