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

@@ -22,31 +22,31 @@
#include <linux/netlink.h>
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct ndmsg {
__u8 ndm_family;
__u8 ndm_pad1;
__u16 ndm_pad2;
__u8 ndm_family;
__u8 ndm_pad1;
__u16 ndm_pad2;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__s32 ndm_ifindex;
__u16 ndm_state;
__u8 ndm_flags;
__u8 ndm_type;
__s32 ndm_ifindex;
__u16 ndm_state;
__u8 ndm_flags;
__u8 ndm_type;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
};
enum {
NDA_UNSPEC,
NDA_DST,
NDA_UNSPEC,
NDA_DST,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
NDA_LLADDR,
NDA_CACHEINFO,
NDA_PROBES,
NDA_VLAN,
NDA_LLADDR,
NDA_CACHEINFO,
NDA_PROBES,
NDA_VLAN,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
NDA_PORT,
NDA_VNI,
NDA_IFINDEX,
NDA_MASTER,
NDA_PORT,
NDA_VNI,
NDA_IFINDEX,
NDA_MASTER,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__NDA_MAX
__NDA_MAX
};
#define NDA_MAX (__NDA_MAX - 1)
#define NTF_USE 0x01
@@ -68,87 +68,87 @@ enum {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define NUD_NONE 0x00
struct nda_cacheinfo {
__u32 ndm_confirmed;
__u32 ndm_used;
__u32 ndm_confirmed;
__u32 ndm_used;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u32 ndm_updated;
__u32 ndm_refcnt;
__u32 ndm_updated;
__u32 ndm_refcnt;
};
struct ndt_stats {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u64 ndts_allocs;
__u64 ndts_destroys;
__u64 ndts_hash_grows;
__u64 ndts_res_failed;
__u64 ndts_allocs;
__u64 ndts_destroys;
__u64 ndts_hash_grows;
__u64 ndts_res_failed;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u64 ndts_lookups;
__u64 ndts_hits;
__u64 ndts_rcv_probes_mcast;
__u64 ndts_rcv_probes_ucast;
__u64 ndts_lookups;
__u64 ndts_hits;
__u64 ndts_rcv_probes_mcast;
__u64 ndts_rcv_probes_ucast;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u64 ndts_periodic_gc_runs;
__u64 ndts_forced_gc_runs;
__u64 ndts_periodic_gc_runs;
__u64 ndts_forced_gc_runs;
};
enum {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
NDTPA_UNSPEC,
NDTPA_IFINDEX,
NDTPA_REFCNT,
NDTPA_REACHABLE_TIME,
NDTPA_UNSPEC,
NDTPA_IFINDEX,
NDTPA_REFCNT,
NDTPA_REACHABLE_TIME,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
NDTPA_BASE_REACHABLE_TIME,
NDTPA_RETRANS_TIME,
NDTPA_GC_STALETIME,
NDTPA_DELAY_PROBE_TIME,
NDTPA_BASE_REACHABLE_TIME,
NDTPA_RETRANS_TIME,
NDTPA_GC_STALETIME,
NDTPA_DELAY_PROBE_TIME,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
NDTPA_QUEUE_LEN,
NDTPA_APP_PROBES,
NDTPA_UCAST_PROBES,
NDTPA_MCAST_PROBES,
NDTPA_QUEUE_LEN,
NDTPA_APP_PROBES,
NDTPA_UCAST_PROBES,
NDTPA_MCAST_PROBES,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
NDTPA_ANYCAST_DELAY,
NDTPA_PROXY_DELAY,
NDTPA_PROXY_QLEN,
NDTPA_LOCKTIME,
NDTPA_ANYCAST_DELAY,
NDTPA_PROXY_DELAY,
NDTPA_PROXY_QLEN,
NDTPA_LOCKTIME,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
NDTPA_QUEUE_LENBYTES,
__NDTPA_MAX
NDTPA_QUEUE_LENBYTES,
__NDTPA_MAX
};
#define NDTPA_MAX (__NDTPA_MAX - 1)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
struct ndtmsg {
__u8 ndtm_family;
__u8 ndtm_pad1;
__u16 ndtm_pad2;
__u8 ndtm_family;
__u8 ndtm_pad1;
__u16 ndtm_pad2;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
};
struct ndt_config {
__u16 ndtc_key_len;
__u16 ndtc_entry_size;
__u16 ndtc_key_len;
__u16 ndtc_entry_size;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u32 ndtc_entries;
__u32 ndtc_last_flush;
__u32 ndtc_last_rand;
__u32 ndtc_hash_rnd;
__u32 ndtc_entries;
__u32 ndtc_last_flush;
__u32 ndtc_last_rand;
__u32 ndtc_hash_rnd;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
__u32 ndtc_hash_mask;
__u32 ndtc_hash_chain_gc;
__u32 ndtc_proxy_qlen;
__u32 ndtc_hash_mask;
__u32 ndtc_hash_chain_gc;
__u32 ndtc_proxy_qlen;
};
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
enum {
NDTA_UNSPEC,
NDTA_NAME,
NDTA_THRESH1,
NDTA_UNSPEC,
NDTA_NAME,
NDTA_THRESH1,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
NDTA_THRESH2,
NDTA_THRESH3,
NDTA_CONFIG,
NDTA_PARMS,
NDTA_THRESH2,
NDTA_THRESH3,
NDTA_CONFIG,
NDTA_PARMS,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
NDTA_STATS,
NDTA_GC_INTERVAL,
__NDTA_MAX
NDTA_STATS,
NDTA_GC_INTERVAL,
__NDTA_MAX
};
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define NDTA_MAX (__NDTA_MAX - 1)