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

@@ -39,26 +39,26 @@
#define VIRTIO_BLK_F_FLUSH VIRTIO_BLK_F_WCE
#define VIRTIO_BLK_ID_BYTES 20
struct virtio_blk_config {
__u64 capacity;
__u64 capacity;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u32 size_max;
__u32 seg_max;
struct virtio_blk_geometry {
__u16 cylinders;
__u32 size_max;
__u32 seg_max;
struct virtio_blk_geometry {
__u16 cylinders;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u8 heads;
__u8 sectors;
} geometry;
__u32 blk_size;
__u8 heads;
__u8 sectors;
} geometry;
__u32 blk_size;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u8 physical_block_exp;
__u8 alignment_offset;
__u16 min_io_size;
__u32 opt_io_size;
__u8 physical_block_exp;
__u8 alignment_offset;
__u16 min_io_size;
__u32 opt_io_size;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u8 wce;
__u8 unused;
__u16 num_queues;
__u8 wce;
__u8 unused;
__u16 num_queues;
} __attribute__((packed));
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define VIRTIO_BLK_T_IN 0
@@ -69,17 +69,17 @@ struct virtio_blk_config {
#define VIRTIO_BLK_T_GET_ID 8
#define VIRTIO_BLK_T_BARRIER 0x80000000
struct virtio_blk_outhdr {
__u32 type;
__u32 type;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u32 ioprio;
__u64 sector;
__u32 ioprio;
__u64 sector;
};
struct virtio_scsi_inhdr {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u32 errors;
__u32 data_len;
__u32 sense_len;
__u32 residual;
__u32 errors;
__u32 data_len;
__u32 sense_len;
__u32 residual;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
};
#define VIRTIO_BLK_S_OK 0