From 1ebb7cf05249fb19a2f1aba6a72a9ec6605257f2 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Fri, 3 Jun 2016 09:25:03 +0000 Subject: [PATCH] [include-fixer] added GNU symbols hardcoded header mapping. Summary: [include-fixer] added GNU symbols hardcoded header mapping. Reviewers: klimek, bkramer Subscribers: cfe-commits, hokein Differential Revision: http://reviews.llvm.org/D20902 llvm-svn: 271637 --- .../find-all-symbols/STLPostfixHeaderMap.cpp | 342 ++++++++++++++++-- 1 file changed, 316 insertions(+), 26 deletions(-) diff --git a/clang-tools-extra/include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp b/clang-tools-extra/include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp index 966a88a22590..c11e67fefa61 100644 --- a/clang-tools-extra/include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp +++ b/clang-tools-extra/include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp @@ -77,9 +77,6 @@ const HeaderMapCollector::HeaderMap *getSTLPostfixHeaderMap() { {"include/xsavesintrin.h", ""}, {"include/xtestintrin.h", ""}, {"include/_G_config.h", ""}, - {"include/alloca.h", ""}, - {"include/asm-generic/errno-base.h", ""}, - {"include/asm-generic/errno.h", ""}, {"include/assert.h", ""}, {"algorithm", ""}, {"array", ""}, @@ -269,22 +266,15 @@ const HeaderMapCollector::HeaderMap *getSTLPostfixHeaderMap() { {"vector", ""}, {"include/complex.h", ""}, {"include/ctype.h", ""}, - {"include/endian.h", ""}, {"include/errno.h", ""}, - {"include/features.h", ""}, {"include/fenv.h", ""}, {"include/inttypes.h", ""}, - {"include/libintl.h", ""}, {"include/libio.h", ""}, {"include/limits.h", ""}, - {"include/linux/limits.h", ""}, {"include/locale.h", ""}, {"include/math.h", ""}, - {"include/pthread.h", ""}, - {"include/sched.h", ""}, {"include/setjmp.h", ""}, {"include/signal.h", ""}, - {"include/stdc-predef.h", ""}, {"include/stdint.h", ""}, {"include/stdio.h", ""}, {"include/stdlib.h", ""}, @@ -292,10 +282,7 @@ const HeaderMapCollector::HeaderMap *getSTLPostfixHeaderMap() { {"include/time.h", ""}, {"include/wchar.h", ""}, {"include/wctype.h", ""}, - {"bits/byteswap-16.h", ""}, - {"bits/byteswap.h", ""}, {"bits/cmathcalls.h", ""}, - {"bits/endian.h", ""}, {"bits/errno.h", ""}, {"bits/fenv.h", ""}, {"bits/huge_val.h", ""}, @@ -309,9 +296,6 @@ const HeaderMapCollector::HeaderMap *getSTLPostfixHeaderMap() { {"bits/nan.h", ""}, {"bits/posix1_lim.h", ""}, {"bits/posix2_lim.h", ""}, - {"bits/pthreadtypes.h", ""}, - {"bits/sched.h", ""}, - {"bits/select.h", ""}, {"bits/setjmp.h", ""}, {"bits/sigaction.h", ""}, {"bits/sigcontext.h", ""}, @@ -319,24 +303,14 @@ const HeaderMapCollector::HeaderMap *getSTLPostfixHeaderMap() { {"bits/signum.h", ""}, {"bits/sigset.h", ""}, {"bits/sigstack.h", ""}, - {"bits/sigthread.h", ""}, {"bits/stdio_lim.h", ""}, {"bits/sys_errlist.h", ""}, {"bits/time.h", ""}, {"bits/timex.h", ""}, - {"bits/types.h", ""}, {"bits/typesizes.h", ""}, - {"bits/waitflags.h", ""}, - {"bits/waitstatus.h", ""}, {"bits/wchar.h", ""}, {"bits/wordsize.h", ""}, {"bits/xopen_lim.h", ""}, - {"gnu/stubs-64.h", ""}, - {"sys/cdefs.h", ""}, - {"sys/select.h", ""}, - {"sys/sysmacros.h", ""}, - {"sys/types.h", ""}, - {"sys/ucontext.h", ""}, {"include/xlocale.h", ""}, {"bits/atomic_word.h", ""}, {"bits/basic_file.h", ""}, @@ -352,6 +326,322 @@ const HeaderMapCollector::HeaderMap *getSTLPostfixHeaderMap() { {"bits/gthr.h", ""}, {"bits/opt_random.h", ""}, {"bits/os_defines.h", ""}, + // GNU C headers + {"include/aio.h", ""}, + {"include/aliases.h", ""}, + {"include/alloca.h", ""}, + {"include/ar.h", ""}, + {"include/argp.h", ""}, + {"include/argz.h", ""}, + {"include/arpa/nameser.h", ""}, + {"include/arpa/nameser_compat.h", ""}, + {"include/byteswap.h", ""}, + {"include/cpio.h", ""}, + {"include/crypt.h", ""}, + {"include/dirent.h", ""}, + {"include/dlfcn.h", ""}, + {"include/elf.h", ""}, + {"include/endian.h", ""}, + {"include/envz.h", ""}, + {"include/err.h", ""}, + {"include/error.h", ""}, + {"include/execinfo.h", ""}, + {"include/fcntl.h", ""}, + {"include/features.h", ""}, + {"include/fenv.h", ""}, + {"include/fmtmsg.h", ""}, + {"include/fnmatch.h", ""}, + {"include/fstab.h", ""}, + {"include/fts.h", ""}, + {"include/ftw.h", ""}, + {"include/gconv.h", ""}, + {"include/getopt.h", ""}, + {"include/glob.h", ""}, + {"include/grp.h", ""}, + {"include/gshadow.h", ""}, + {"include/iconv.h", ""}, + {"include/ifaddrs.h", ""}, + {"include/kdb.h", ""}, + {"include/langinfo.h", ""}, + {"include/libgen.h", ""}, + {"include/libintl.h", ""}, + {"include/link.h", ""}, + {"include/malloc.h", ""}, + {"include/mcheck.h", ""}, + {"include/memory.h", ""}, + {"include/mntent.h", ""}, + {"include/monetary.h", ""}, + {"include/mqueue.h", ""}, + {"include/netdb.h", ""}, + {"include/netinet/in.h", ""}, + {"include/nl_types.h", ""}, + {"include/nss.h", ""}, + {"include/obstack.h", ""}, + {"include/panel.h", ""}, + {"include/paths.h", ""}, + {"include/printf.h", ""}, + {"include/profile.h", ""}, + {"include/pthread.h", ""}, + {"include/pty.h", ""}, + {"include/pwd.h", ""}, + {"include/re_comp.h", ""}, + {"include/regex.h", ""}, + {"include/regexp.h", ""}, + {"include/resolv.h", ""}, + {"include/rpc/netdb.h", ""}, + {"include/sched.h", ""}, + {"include/search.h", ""}, + {"include/semaphore.h", ""}, + {"include/sgtty.h", ""}, + {"include/shadow.h", ""}, + {"include/spawn.h", ""}, + {"include/stab.h", ""}, + {"include/stdc-predef.h", ""}, + {"include/stdio_ext.h", ""}, + {"include/strings.h", ""}, + {"include/stropts.h", ""}, + {"include/sudo_plugin.h", ""}, + {"include/sysexits.h", ""}, + {"include/tar.h", ""}, + {"include/tcpd.h", ""}, + {"include/term.h", ""}, + {"include/term_entry.h", ""}, + {"include/termcap.h", ""}, + {"include/termios.h", ""}, + {"include/thread_db.h", ""}, + {"include/tic.h", ""}, + {"include/ttyent.h", ""}, + {"include/uchar.h", ""}, + {"include/ucontext.h", ""}, + {"include/ulimit.h", ""}, + {"include/unctrl.h", ""}, + {"include/unistd.h", ""}, + {"include/utime.h", ""}, + {"include/utmp.h", ""}, + {"include/utmpx.h", ""}, + {"include/values.h", ""}, + {"include/wordexp.h", ""}, + {"fpu_control.h", ""}, + {"ieee754.h", ""}, + {"include/xlocale.h", ""}, + {"gnu/lib-names.h", ""}, + {"gnu/libc-version.h", ""}, + {"gnu/option-groups.h", ""}, + {"gnu/stubs-32.h", ""}, + {"gnu/stubs-64.h", ""}, + {"gnu/stubs-x32.h", ""}, + {"include/rpc/auth_des.h", ""}, + {"include/rpc/rpc_msg.h", ""}, + {"include/rpc/pmap_clnt.h", ""}, + {"include/rpc/rpc.h", ""}, + {"include/rpc/types.h", ""}, + {"include/rpc/auth_unix.h", ""}, + {"include/rpc/key_prot.h", ""}, + {"include/rpc/pmap_prot.h", ""}, + {"include/rpc/auth.h", ""}, + {"include/rpc/svc_auth.h", ""}, + {"include/rpc/xdr.h", ""}, + {"include/rpc/pmap_rmt.h", ""}, + {"include/rpc/des_crypt.h", ""}, + {"include/rpc/svc.h", ""}, + {"include/rpc/rpc_des.h", ""}, + {"include/rpc/clnt.h", ""}, + {"include/scsi/scsi.h", ""}, + {"include/scsi/sg.h", ""}, + {"include/scsi/scsi_ioctl.h", ""}, + {"include/netrose/rose.h", ""}, + {"include/nfs/nfs.h", ""}, + {"include/netatalk/at.h", ""}, + {"include/netinet/ether.h", ""}, + {"include/netinet/icmp6.h", ""}, + {"include/netinet/if_ether.h", ""}, + {"include/netinet/if_fddi.h", ""}, + {"include/netinet/if_tr.h", ""}, + {"include/netinet/igmp.h", ""}, + {"include/netinet/in.h", ""}, + {"include/netinet/in_systm.h", ""}, + {"include/netinet/ip.h", ""}, + {"include/netinet/ip6.h", ""}, + {"include/netinet/ip_icmp.h", ""}, + {"include/netinet/tcp.h", ""}, + {"include/netinet/udp.h", ""}, + {"include/netrom/netrom.h", ""}, + {"include/protocols/routed.h", ""}, + {"include/protocols/rwhod.h", ""}, + {"include/protocols/talkd.h", ""}, + {"include/protocols/timed.h", ""}, + {"include/rpcsvc/klm_prot.x", ""}, + {"include/rpcsvc/rstat.h", ""}, + {"include/rpcsvc/spray.x", ""}, + {"include/rpcsvc/nlm_prot.x", ""}, + {"include/rpcsvc/nis_callback.x", ""}, + {"include/rpcsvc/yp.h", ""}, + {"include/rpcsvc/yp.x", ""}, + {"include/rpcsvc/nfs_prot.h", ""}, + {"include/rpcsvc/rex.h", ""}, + {"include/rpcsvc/yppasswd.h", ""}, + {"include/rpcsvc/rex.x", ""}, + {"include/rpcsvc/nis_tags.h", ""}, + {"include/rpcsvc/nis_callback.h", ""}, + {"include/rpcsvc/nfs_prot.x", ""}, + {"include/rpcsvc/bootparam_prot.x", ""}, + {"include/rpcsvc/rusers.x", ""}, + {"include/rpcsvc/rquota.x", ""}, + {"include/rpcsvc/nis.h", ""}, + {"include/rpcsvc/nislib.h", ""}, + {"include/rpcsvc/ypupd.h", ""}, + {"include/rpcsvc/bootparam.h", ""}, + {"include/rpcsvc/spray.h", ""}, + {"include/rpcsvc/key_prot.h", ""}, + {"include/rpcsvc/klm_prot.h", ""}, + {"include/rpcsvc/sm_inter.h", ""}, + {"include/rpcsvc/nlm_prot.h", ""}, + {"include/rpcsvc/yp_prot.h", ""}, + {"include/rpcsvc/ypclnt.h", ""}, + {"include/rpcsvc/rstat.x", ""}, + {"include/rpcsvc/rusers.h", ""}, + {"include/rpcsvc/key_prot.x", ""}, + {"include/rpcsvc/sm_inter.x", ""}, + {"include/rpcsvc/rquota.h", ""}, + {"include/rpcsvc/nis.x", ""}, + {"include/rpcsvc/bootparam_prot.h", ""}, + {"include/rpcsvc/mount.h", ""}, + {"include/rpcsvc/mount.x", ""}, + {"include/rpcsvc/nis_object.x", ""}, + {"include/rpcsvc/yppasswd.x", ""}, + {"sys/acct.h", ""}, + {"sys/auxv.h", ""}, + {"sys/cdefs.h", ""}, + {"sys/debugreg.h", ""}, + {"sys/dir.h", ""}, + {"sys/elf.h", ""}, + {"sys/epoll.h", ""}, + {"sys/eventfd.h", ""}, + {"sys/fanotify.h", ""}, + {"sys/file.h", ""}, + {"sys/fsuid.h", ""}, + {"sys/gmon.h", ""}, + {"sys/gmon_out.h", ""}, + {"sys/inotify.h", ""}, + {"sys/io.h", ""}, + {"sys/ioctl.h", ""}, + {"sys/ipc.h", ""}, + {"sys/kd.h", ""}, + {"sys/kdaemon.h", ""}, + {"sys/klog.h", ""}, + {"sys/mman.h", ""}, + {"sys/mount.h", ""}, + {"sys/msg.h", ""}, + {"sys/mtio.h", ""}, + {"sys/param.h", ""}, + {"sys/pci.h", ""}, + {"sys/perm.h", ""}, + {"sys/personality.h", ""}, + {"sys/poll.h", ""}, + {"sys/prctl.h", ""}, + {"sys/procfs.h", ""}, + {"sys/profil.h", ""}, + {"sys/ptrace.h", ""}, + {"sys/queue.h", ""}, + {"sys/quota.h", ""}, + {"sys/raw.h", ""}, + {"sys/reboot.h", ""}, + {"sys/reg.h", ""}, + {"sys/resource.h", ""}, + {"sys/select.h", ""}, + {"sys/sem.h", ""}, + {"sys/sendfile.h", ""}, + {"sys/shm.h", ""}, + {"sys/signalfd.h", ""}, + {"sys/socket.h", ""}, + {"sys/stat.h", ""}, + {"sys/statfs.h", ""}, + {"sys/statvfs.h", ""}, + {"sys/swap.h", ""}, + {"sys/syscall.h", ""}, + {"sys/sysctl.h", ""}, + {"sys/sysinfo.h", ""}, + {"sys/syslog.h", ""}, + {"sys/sysmacros.h", ""}, + {"sys/termios.h", ""}, + {"sys/time.h", ""}, + {"sys/timeb.h", ""}, + {"sys/timerfd.h", ""}, + {"sys/times.h", ""}, + {"sys/timex.h", ""}, + {"sys/ttychars.h", ""}, + {"sys/ttydefaults.h", ""}, + {"sys/types.h", ""}, + {"sys/ucontext.h", ""}, + {"sys/uio.h", ""}, + {"sys/un.h", ""}, + {"sys/user.h", ""}, + {"sys/ustat.h", ""}, + {"sys/utsname.h", ""}, + {"sys/vlimit.h", ""}, + {"sys/vm86.h", ""}, + {"sys/vtimes.h", ""}, + {"sys/wait.h", ""}, + {"sys/xattr.h", ""}, + {"bits/epoll.h", ""}, + {"bits/eventfd.h", ""}, + {"bits/inotify.h", ""}, + {"bits/ipc.h", ""}, + {"bits/ipctypes.h", ""}, + {"bits/mman-linux.h", ""}, + {"bits/mman.h", ""}, + {"bits/msq.h", ""}, + {"bits/resource.h", ""}, + {"bits/sem.h", ""}, + {"bits/shm.h", ""}, + {"bits/signalfd.h", ""}, + {"bits/statfs.h", ""}, + {"bits/statvfs.h", ""}, + {"bits/timerfd.h", ""}, + {"bits/utsname.h", ""}, + {"bits/auxv.h", ""}, + {"bits/byteswap-16.h", ""}, + {"bits/byteswap.h", ""}, + {"bits/confname.h", ""}, + {"bits/dirent.h", ""}, + {"bits/dlfcn.h", ""}, + {"bits/elfclass.h", ""}, + {"bits/endian.h", ""}, + {"bits/environments.h", ""}, + {"bits/fcntl-linux.h", ""}, + {"bits/fcntl.h", ""}, + {"bits/in.h", ""}, + {"bits/ioctl-types.h", ""}, + {"bits/ioctls.h", ""}, + {"bits/link.h", ""}, + {"bits/mqueue.h", ""}, + {"bits/netdb.h", ""}, + {"bits/param.h", ""}, + {"bits/poll.h", ""}, + {"bits/posix_opt.h", ""}, + {"bits/pthreadtypes.h", ""}, + {"bits/sched.h", ""}, + {"bits/select.h", ""}, + {"bits/semaphore.h", ""}, + {"bits/sigthread.h", ""}, + {"bits/sockaddr.h", ""}, + {"bits/socket.h", ""}, + {"bits/socket_type.h", ""}, + {"bits/stab.def", ""}, + {"bits/stat.h", ""}, + {"bits/stropts.h", ""}, + {"bits/syscall.h", ""}, + {"bits/syslog-path.h", ""}, + {"bits/termios.h", ""}, + {"bits/types.h", ""}, + {"bits/typesizes.h", ""}, + {"bits/uio.h", ""}, + {"bits/ustat.h", ""}, + {"bits/utmp.h", ""}, + {"bits/utmpx.h", ""}, + {"bits/waitflags.h", ""}, + {"bits/waitstatus.h", ""}, + {"bits/xtitypes.h", ""}, }; return &STLPostfixHeaderMap; }