Switch kernel header parsing to python libclang

Replace the tokenizer in cpp.py with libclang.

Bug: 18937958
Change-Id: I27630904c6d2849418cd5ca3d3c612ec3078686d
This commit is contained in:
Tao Bao
2015-01-28 10:07:51 -08:00
parent 11829be3e1
commit d7db594b8d
670 changed files with 32589 additions and 32507 deletions

View File

@@ -23,101 +23,101 @@
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#include <linux/usb/ch9.h>
enum {
FUNCTIONFS_DESCRIPTORS_MAGIC = 1,
FUNCTIONFS_STRINGS_MAGIC = 2,
FUNCTIONFS_DESCRIPTORS_MAGIC = 1,
FUNCTIONFS_STRINGS_MAGIC = 2,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
FUNCTIONFS_DESCRIPTORS_MAGIC_V2 = 3,
FUNCTIONFS_DESCRIPTORS_MAGIC_V2 = 3,
};
enum functionfs_flags {
FUNCTIONFS_HAS_FS_DESC = 1,
FUNCTIONFS_HAS_FS_DESC = 1,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
FUNCTIONFS_HAS_HS_DESC = 2,
FUNCTIONFS_HAS_SS_DESC = 4,
FUNCTIONFS_HAS_MS_OS_DESC = 8,
FUNCTIONFS_VIRTUAL_ADDR = 16,
FUNCTIONFS_HAS_HS_DESC = 2,
FUNCTIONFS_HAS_SS_DESC = 4,
FUNCTIONFS_HAS_MS_OS_DESC = 8,
FUNCTIONFS_VIRTUAL_ADDR = 16,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
};
struct usb_endpoint_descriptor_no_audio {
__u8 bLength;
__u8 bDescriptorType;
__u8 bLength;
__u8 bDescriptorType;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u8 bEndpointAddress;
__u8 bmAttributes;
__le16 wMaxPacketSize;
__u8 bInterval;
__u8 bEndpointAddress;
__u8 bmAttributes;
__le16 wMaxPacketSize;
__u8 bInterval;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
} __attribute__((packed));
struct usb_functionfs_descs_head_v2 {
__le32 magic;
__le32 length;
__le32 magic;
__le32 length;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__le32 flags;
__le32 flags;
} __attribute__((packed));
struct usb_functionfs_descs_head {
__le32 magic;
__le32 magic;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__le32 length;
__le32 fs_count;
__le32 hs_count;
__le32 length;
__le32 fs_count;
__le32 hs_count;
} __attribute__((packed, deprecated));
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct usb_os_desc_header {
__u8 interface;
__le32 dwLength;
__le16 bcdVersion;
__u8 interface;
__le32 dwLength;
__le16 bcdVersion;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__le16 wIndex;
union {
struct {
__u8 bCount;
__le16 wIndex;
union {
struct {
__u8 bCount;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u8 Reserved;
};
__le16 wCount;
};
__u8 Reserved;
};
__le16 wCount;
};
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
} __attribute__((packed));
struct usb_ext_compat_desc {
__u8 bFirstInterfaceNumber;
__u8 Reserved1;
__u8 bFirstInterfaceNumber;
__u8 Reserved1;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u8 CompatibleID[8];
__u8 SubCompatibleID[8];
__u8 Reserved2[6];
__u8 CompatibleID[8];
__u8 SubCompatibleID[8];
__u8 Reserved2[6];
};
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct usb_ext_prop_desc {
__le32 dwSize;
__le32 dwPropertyDataType;
__le16 wPropertyNameLength;
__le32 dwSize;
__le32 dwPropertyDataType;
__le16 wPropertyNameLength;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
} __attribute__((packed));
struct usb_functionfs_strings_head {
__le32 magic;
__le32 length;
__le32 magic;
__le32 length;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__le32 str_count;
__le32 lang_count;
__le32 str_count;
__le32 lang_count;
} __attribute__((packed));
enum usb_functionfs_event_type {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
FUNCTIONFS_BIND,
FUNCTIONFS_UNBIND,
FUNCTIONFS_ENABLE,
FUNCTIONFS_DISABLE,
FUNCTIONFS_BIND,
FUNCTIONFS_UNBIND,
FUNCTIONFS_ENABLE,
FUNCTIONFS_DISABLE,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
FUNCTIONFS_SETUP,
FUNCTIONFS_SUSPEND,
FUNCTIONFS_RESUME
FUNCTIONFS_SETUP,
FUNCTIONFS_SUSPEND,
FUNCTIONFS_RESUME
};
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct usb_functionfs_event {
union {
struct usb_ctrlrequest setup;
} __attribute__((packed)) u;
union {
struct usb_ctrlrequest setup;
} __attribute__((packed)) u;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u8 type;
__u8 _pad[3];
__u8 type;
__u8 _pad[3];
} __attribute__((packed));
#define FUNCTIONFS_FIFO_STATUS _IO('g', 1)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
@@ -126,5 +126,5 @@ struct usb_functionfs_event {
#define FUNCTIONFS_INTERFACE_REVMAP _IO('g', 128)
#define FUNCTIONFS_ENDPOINT_REVMAP _IO('g', 129)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define FUNCTIONFS_ENDPOINT_DESC _IOR('g', 130, struct usb_endpoint_descriptor)
#define FUNCTIONFS_ENDPOINT_DESC _IOR('g', 130, struct usb_endpoint_descriptor)
#endif