From: Reid Spencer Date: Wed, 1 Sep 2004 22:55:40 +0000 (+0000) Subject: Changes For Bug 352 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=551ccae044b0ff658fe629dd67edd5ffe75d10e8;p=oota-llvm.git Changes For Bug 352 Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 603a7c520b6..86cf136939b 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -8,7 +8,7 @@ dnl Quit if the source directory has already been configured. dnl NOTE: This relies upon undocumented autoconf behavior. if test ${srcdir} != "." then - if test -f ${srcdir}/include/Config/config.h + if test -f ${srcdir}/include/llvm/Config/config.h then AC_MSG_ERROR([Already configured in ${srcdir}]) fi @@ -27,15 +27,15 @@ do done dnl Configure header files -AC_CONFIG_HEADERS(include/Config/config.h) +AC_CONFIG_HEADERS(include/llvm/Config/config.h) dnl Configure other output file AC_CONFIG_FILES(Makefile.config - include/Support/DataTypes.h - include/Support/ThreadSupport.h - include/Support/hash_map - include/Support/hash_set - include/Support/iterator) + include/llvm/Support/DataTypes.h + include/llvm/Support/ThreadSupport.h + include/llvm/ADT/hash_map + include/llvm/ADT/hash_set + include/llvm/ADT/iterator) dnl Do special configuration of Makefiles AC_CONFIG_MAKEFILE(Makefile) diff --git a/configure b/configure index 325ed37404d..3f7f65b0dbd 100755 --- a/configure +++ b/configure @@ -1544,7 +1544,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. if test ${srcdir} != "." then - if test -f ${srcdir}/include/Config/config.h + if test -f ${srcdir}/include/llvm/Config/config.h then { { echo "$as_me:$LINENO: error: Already configured in ${srcdir}" >&5 echo "$as_me: error: Already configured in ${srcdir}" >&2;} @@ -1566,10 +1566,10 @@ subdirs="$subdirs projects/${i}" fi done - ac_config_headers="$ac_config_headers include/Config/config.h" + ac_config_headers="$ac_config_headers include/llvm/Config/config.h" - ac_config_files="$ac_config_files Makefile.config include/Support/DataTypes.h include/Support/ThreadSupport.h include/Support/hash_map include/Support/hash_set include/Support/iterator" + ac_config_files="$ac_config_files Makefile.config include/llvm/Support/DataTypes.h include/llvm/Support/ThreadSupport.h include/llvm/ADT/hash_map include/llvm/ADT/hash_set include/llvm/ADT/iterator" ac_config_commands="$ac_config_commands Makefile" @@ -24450,11 +24450,11 @@ do case "$ac_config_target" in # Handling of arguments. "Makefile.config" ) CONFIG_FILES="$CONFIG_FILES Makefile.config" ;; - "include/Support/DataTypes.h" ) CONFIG_FILES="$CONFIG_FILES include/Support/DataTypes.h" ;; - "include/Support/ThreadSupport.h" ) CONFIG_FILES="$CONFIG_FILES include/Support/ThreadSupport.h" ;; - "include/Support/hash_map" ) CONFIG_FILES="$CONFIG_FILES include/Support/hash_map" ;; - "include/Support/hash_set" ) CONFIG_FILES="$CONFIG_FILES include/Support/hash_set" ;; - "include/Support/iterator" ) CONFIG_FILES="$CONFIG_FILES include/Support/iterator" ;; + "include/llvm/Support/DataTypes.h" ) CONFIG_FILES="$CONFIG_FILES include/llvm/Support/DataTypes.h" ;; + "include/llvm/Support/ThreadSupport.h" ) CONFIG_FILES="$CONFIG_FILES include/llvm/Support/ThreadSupport.h" ;; + "include/llvm/ADT/hash_map" ) CONFIG_FILES="$CONFIG_FILES include/llvm/ADT/hash_map" ;; + "include/llvm/ADT/hash_set" ) CONFIG_FILES="$CONFIG_FILES include/llvm/ADT/hash_set" ;; + "include/llvm/ADT/iterator" ) CONFIG_FILES="$CONFIG_FILES include/llvm/ADT/iterator" ;; "lib/System/platform" ) CONFIG_LINKS="$CONFIG_LINKS lib/System/platform:lib/System/$platform_type" ;; "Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile" ;; "Makefile.common" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile.common" ;; @@ -24507,7 +24507,7 @@ do "tools/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS tools/Makefile" ;; "utils/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS utils/Makefile" ;; "projects/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS projects/Makefile" ;; - "include/Config/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/Config/config.h" ;; + "include/llvm/Config/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/Config/config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; diff --git a/include/Config/alloca.h b/include/Config/alloca.h deleted file mode 100644 index 297b56fa7c5..00000000000 --- a/include/Config/alloca.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * The LLVM Compiler Infrastructure - * - * This file was developed by the LLVM research group and is distributed under - * the University of Illinois Open Source License. See LICENSE.TXT for details. - * - ****************************************************************************** - * - * Description: - * This header file includes the infamous alloc.h header file if the - * autoconf system has found it. It hides all of the autoconf details - * from the rest of the application source code. - */ - -#ifndef _CONFIG_ALLOC_H -#define _CONFIG_ALLOC_H - -#include "Config/config.h" - -/* - * This is a modified version of that suggested by the Autoconf manual. - * 1) The #pragma is indented so that pre-ANSI C compilers ignore it. - * 2) If alloca.h cannot be found, then try stdlib.h. Some platforms - * (notably FreeBSD) defined alloca() there. - */ -#ifdef _MSC_VER -/* noop on Visual C++ */ -#elif defined(HAVE_ALLOCA_H) -#include -#elif !defined(__GNUC__) -# ifdef _AIX - # pragma alloca -# else -# ifndef alloca - char * alloca (); -# endif -# endif -#else -# ifdef HAVE_STDLIB_H -# include -# else -# error "The function alloca() is required but not found!" -# endif -#endif - -#endif - diff --git a/include/Config/config.h.in b/include/Config/config.h.in deleted file mode 100644 index fe0c77c8af3..00000000000 --- a/include/Config/config.h.in +++ /dev/null @@ -1,240 +0,0 @@ -/* include/Config/config.h.in. Generated from autoconf/configure.ac by autoheader. */ - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -#undef CRAY_STACKSEG_END - -/* Define to 1 if using `alloca.c'. */ -#undef C_ALLOCA - -/* Define to 1 if you have `alloca', as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#undef HAVE_ALLOCA_H - -/* Define to 1 if you have the `backtrace' function. */ -#undef HAVE_BACKTRACE - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define if dlopen() is available on this platform. */ -#undef HAVE_DLOPEN - -/* Define to 1 if you have the header file. */ -#undef HAVE_EXECINFO_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if your compiler defines finite in the header file. - */ -#undef HAVE_FINITE_IN_IEEEFP_H - -/* Define to 1 if you have the `getcwd' function. */ -#undef HAVE_GETCWD - -/* Define to 1 if you have the `getpagesize' function. */ -#undef HAVE_GETPAGESIZE - -/* Define to 1 if you have the `getrusage' function. */ -#undef HAVE_GETRUSAGE - -/* Define to 1 if you have the `gettimeofday' function. */ -#undef HAVE_GETTIMEOFDAY - -/* Define to 1 if the system has the type `int64_t'. */ -#undef HAVE_INT64_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `isatty' function. */ -#undef HAVE_ISATTY - -/* Define to 1 if your compiler defines isinf in the header file. */ -#undef HAVE_ISINF_IN_CMATH - -/* Define to 1 if your compiler defines isinf in the header file. */ -#undef HAVE_ISINF_IN_MATH_H - -/* Define to 1 if your compiler defines isnan in the header file. */ -#undef HAVE_ISNAN_IN_CMATH - -/* Define to 1 if your compiler defines isnan in the header file. */ -#undef HAVE_ISNAN_IN_MATH_H - -/* Define to 1 if you have the `elf' library (-lelf). */ -#undef HAVE_LIBELF - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LINK_H - -/* Define if you can use -Wl,-R. to pass -R. to the linker, in order to add - the current directory to the dynamic linker search path. */ -#undef HAVE_LINK_R - -/* Define if mallinfo() is available on this platform. */ -#undef HAVE_MALLINFO - -/* Define to 1 if you have the header file. */ -#undef HAVE_MALLOC_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `mkstemp' function. */ -#undef HAVE_MKSTEMP - -/* Define to 1 if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define if mmap() uses MAP_ANONYMOUS to map anonymous pages, or undefine if - it uses MAP_ANON */ -#undef HAVE_MMAP_ANONYMOUS - -/* Define if mmap() can map files into memory */ -#undef HAVE_MMAP_FILE - -/* define if the compiler implements namespaces */ -#undef HAVE_NAMESPACES - -/* Define to have the %a format string */ -#undef HAVE_PRINTF_A - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if your compiler defines std::isinf in the header file. - */ -#undef HAVE_STD_ISINF_IN_CMATH - -/* Define to 1 if your compiler defines std::isnan in the header file. - */ -#undef HAVE_STD_ISNAN_IN_CMATH - -/* Define to 1 if you have the `strdup' function. */ -#undef HAVE_STRDUP - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strtoll' function. */ -#undef HAVE_STRTOLL - -/* Define to 1 if you have the `strtoq' function. */ -#undef HAVE_STRTOQ - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_MMAN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_RESOURCE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have that is POSIX.1 compatible. */ -#undef HAVE_SYS_WAIT_H - -/* Define to 1 if the system has the type `uint64_t'. */ -#undef HAVE_UINT64_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_WINDOWS_H - -/* Installation directory for binary executables */ -#undef LLVM_BINDIR - -/* Time at which LLVM was configured */ -#undef LLVM_CONFIGTIME - -/* Installation directory for documentation */ -#undef LLVM_DATADIR - -/* Installation directory for config files */ -#undef LLVM_ETCDIR - -/* Installation directory for include files */ -#undef LLVM_INCLUDEDIR - -/* Installation directory for .info files */ -#undef LLVM_INFODIR - -/* Installation directory for libraries */ -#undef LLVM_LIBDIR - -/* Installation directory for man pages */ -#undef LLVM_MANDIR - -/* Installation prefix directory */ -#undef LLVM_PREFIX - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define as the return type of signal handlers (`int' or `void'). */ -#undef RETSIGTYPE - -/* Extension that shared libraries have, e.g., ".so". */ -#undef SHLIBEXT - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -#undef STACK_DIRECTION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Define to 1 if your declares `struct tm'. */ -#undef TM_IN_SYS_TIME - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#undef YYTEXT_POINTER - -/* Define to `int' if does not define. */ -#undef pid_t - -/* Define to `unsigned' if does not define. */ -#undef size_t diff --git a/include/Config/dlfcn.h b/include/Config/dlfcn.h deleted file mode 100644 index c7ce5b19688..00000000000 --- a/include/Config/dlfcn.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * The LLVM Compiler Infrastructure - * - * This file was developed by the LLVM research group and is distributed under - * the University of Illinois Open Source License. See LICENSE.TXT for details. - * - ****************************************************************************** - * - * Description: - * This header file is the autoconf replacement for dlfcn.h (if it lives - * on the system). - */ - -#ifndef _CONFIG_DLFCN_H -#define _CONFIG_DLFCN_H - -#include "Config/config.h" - -#ifdef HAVE_DLFCN_H -#include -#endif - -#endif diff --git a/include/Config/fcntl.h b/include/Config/fcntl.h deleted file mode 100644 index ed8a1c839b5..00000000000 --- a/include/Config/fcntl.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * The LLVM Compiler Infrastructure - * - * This file was developed by the LLVM research group and is distributed under - * the University of Illinois Open Source License. See LICENSE.TXT for details. - * - ****************************************************************************** - * - * Description: - * This header file is the autoconf replacement for fcntl.h (if it lives - * on the system). - */ - -#ifndef _CONFIG_FCNTL_H -#define _CONFIG_FCNTL_H - -#include "Config/config.h" - -#ifdef HAVE_FCNTL_H -#include -#endif - -#endif diff --git a/include/Config/limits.h b/include/Config/limits.h deleted file mode 100644 index e5a787e5e14..00000000000 --- a/include/Config/limits.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * The LLVM Compiler Infrastructure - * - * This file was developed by the LLVM research group and is distributed under - * the University of Illinois Open Source License. See LICENSE.TXT for details. - * - ****************************************************************************** - * - * Description: - * This header file is the autoconf replacement for limits.h (if it lives - * on the system). - */ - -#ifndef _CONFIG_LIMITS_H -#define _CONFIG_LIMITS_H - -#include "Config/config.h" - -#ifdef HAVE_LIMITS_H -#include -#endif - -#endif diff --git a/include/Config/malloc.h b/include/Config/malloc.h deleted file mode 100644 index c78408a3598..00000000000 --- a/include/Config/malloc.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * The LLVM Compiler Infrastructure - * - * This file was developed by the LLVM research group and is distributed under - * the University of Illinois Open Source License. See LICENSE.TXT for details. - * - ****************************************************************************** - * - * Description: - * This header file includes the infamous malloc.h header file if the - * autoconf system has found it. It hides all of the autoconf details - * from the rest of the application source code. - */ - -#ifndef _SUPPORT_MALLOC_H -#define _SUPPORT_MALLOC_H - -#include "Config/config.h" - -#ifdef HAVE_MALLOC_H -#include -#endif - -#endif - diff --git a/include/Config/memory.h b/include/Config/memory.h deleted file mode 100644 index f75902b5bc5..00000000000 --- a/include/Config/memory.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * The LLVM Compiler Infrastructure - * - * This file was developed by the LLVM research group and is distributed under - * the University of Illinois Open Source License. See LICENSE.TXT for details. - * - ****************************************************************************** - * - * Description: - * This header file is the autoconf replacement for memory.h (if it lives - * on the system). - */ - -#ifndef _CONFIG_MEMORY_H -#define _CONFIG_MEMORY_H - -#include "Config/config.h" - -#ifdef HAVE_MEMORY_H -#include -#endif - -#endif diff --git a/include/Config/pagesize.h b/include/Config/pagesize.h deleted file mode 100644 index f37b29770d4..00000000000 --- a/include/Config/pagesize.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * The LLVM Compiler Infrastructure - * - * This file was developed by the LLVM research group and is distributed under - * the University of Illinois Open Source License. See LICENSE.TXT for details. - * - ****************************************************************************** - * - * This header file provides a platform-independent way of quering page size. - */ - -#ifndef PAGESIZE_H -#define PAGESIZE_H - -#include "Config/unistd.h" -#include - -namespace llvm { - -/* Compatibility chart: - * - * Linux/x86: _SC_PAGESIZE, _SC_PAGE_SIZE - * MacOS X/PowerPC: v. 10.2: NBPG, - * v. 10.3: _SC_PAGESIZE - * Solaris/Sparc: _SC_PAGESIZE, _SC_PAGE_SIZE - */ - -/** - * GetPageSize - wrapper to return page size in bytes for various - * architecture/OS combinations - */ -unsigned GetPageSize() { -#ifdef _SC_PAGESIZE - return sysconf(_SC_PAGESIZE); -#elif defined(_SC_PAGE_SIZE) - return sysconf(_SC_PAGE_SIZE); -#elif defined(NBPG) -#ifndef CLSIZE -#define CLSIZE 1 -#endif - return NBPG * CLSIZE; -#else - return 4096; /* allocate 4KB as a fall-back */ -#endif -} - -} - -#endif diff --git a/include/Config/stdint.h b/include/Config/stdint.h deleted file mode 100644 index a98961063ef..00000000000 --- a/include/Config/stdint.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * The LLVM Compiler Infrastructure - * - * This file was developed by the LLVM research group and is distributed under - * the University of Illinois Open Source License. See LICENSE.TXT for details. - * - ****************************************************************************** - * - * Description: - * This header file is the autoconf replacement for stdint.h (if it lives - * on the system). - */ - -#ifndef _CONFIG_STDINT_H -#define _CONFIG_STDINT_H - -#include "Config/config.h" - -#ifdef HAVE_STDINT_H -#include -#endif - -#endif diff --git a/include/Config/sys/mman.h b/include/Config/sys/mman.h deleted file mode 100644 index 7f51e7fbfbe..00000000000 --- a/include/Config/sys/mman.h +++ /dev/null @@ -1,32 +0,0 @@ -/*===-- Config/sys/mman.h - Autoconf sys/mman.h wrapper -----------*- C -*-===// - * - * The LLVM Compiler Infrastructure - * - * This file was developed by the LLVM research group and is distributed under - * the University of Illinois Open Source License. See LICENSE.TXT for details. - * - *===----------------------------------------------------------------------===// - * - * Description: - * This header file includes the headers needed for the mmap() system/ - * function call. It also defines some macros so that all of our calls - * to mmap() can act (more or less) the same, regardless of platform. - * - *===----------------------------------------------------------------------===// - */ - -#ifndef _CONFIG_MMAN_H -#define _CONFIG_MMAN_H - -#include "Config/config.h" - -#if defined(HAVE_SYS_MMAN_H) && !defined(_MSC_VER) -#include -#endif - -#ifndef HAVE_MMAP_ANONYMOUS -#define MAP_ANONYMOUS MAP_ANON -#endif - -#endif - diff --git a/include/Config/sys/resource.h b/include/Config/sys/resource.h deleted file mode 100644 index 1f4cc694b29..00000000000 --- a/include/Config/sys/resource.h +++ /dev/null @@ -1,34 +0,0 @@ -/*===-- Config/sys/resource.h -----------------------------------*- C++ -*-===// - * - * The LLVM Compiler Infrastructure - * - * This file was developed by the LLVM research group and is distributed under - * the University of Illinois Open Source License. See LICENSE.TXT for details. - * - *===----------------------------------------------------------------------===// - * - * This header file is the autoconf replacement for sys/resource.h (if it - * lives on the system). - * - *===----------------------------------------------------------------------===// - */ - -#ifndef _CONFIG_SYS_RESOURCE_H -#define _CONFIG_SYS_RESOURCE_H - -#include "Config/config.h" - -#if defined(HAVE_SYS_RESOURCE_H) && !defined(_MSC_VER) - -/* - * In LLVM, we use sys/resource.h to use getrusage() and maybe some other - * stuff. Some man pages say that you also need sys/time.h and unistd.h. - * So, to be paranoid, we will try to include all three if possible. - */ -#include "Config/sys/time.h" -#include -#include "Config/unistd.h" - -#endif - -#endif diff --git a/include/Config/sys/stat.h b/include/Config/sys/stat.h deleted file mode 100644 index 9669bcf927b..00000000000 --- a/include/Config/sys/stat.h +++ /dev/null @@ -1,29 +0,0 @@ -/*===-- Config/sys/stat.h -----------------------------------*- ----C++ -*-===// - * - * The LLVM Compiler Infrastructure - * - * This file was developed by the LLVM research group and is distributed under - * the University of Illinois Open Source License. See LICENSE.TXT for details. - * - *===----------------------------------------------------------------------===// - * This header file includes the headers needed for the stat() system - * call. - * - *===----------------------------------------------------------------------===// - */ - -#ifndef _CONFIG_SYS_STAT_H -#define _CONFIG_SYS_STAT_H - -#include "Config/config.h" - -#ifdef HAVE_SYS_STAT_H -#include -#endif - -#if defined(_MSC_VER) -#define S_ISREG(X) ((X) & _S_IFREG) -#endif - -#endif - diff --git a/include/Config/sys/time.h b/include/Config/sys/time.h deleted file mode 100644 index 3e0ea1e8109..00000000000 --- a/include/Config/sys/time.h +++ /dev/null @@ -1,24 +0,0 @@ -/*===-- Config/sys/time.h ---------------------------------------*- C++ -*-===// - * - * The LLVM Compiler Infrastructure - * - * This file was developed by the LLVM research group and is distributed under - * the University of Illinois Open Source License. See LICENSE.TXT for details. - * - *===----------------------------------------------------------------------===// - * This header file is the autoconf replacement for sys/time.h (if it - * lives on the system). - * - *===----------------------------------------------------------------------===// - */ - -#ifndef _CONFIG_SYS_TIME_H -#define _CONFIG_SYS_TIME_H - -#include "Config/config.h" - -#if defined(HAVE_SYS_TIME_H) && !defined(_MSC_VER) -#include -#endif - -#endif diff --git a/include/Config/sys/types.h b/include/Config/sys/types.h deleted file mode 100644 index f0a7abec355..00000000000 --- a/include/Config/sys/types.h +++ /dev/null @@ -1,25 +0,0 @@ -/*===-- Config/sys/types.h --------------------------------------*- C++ -*-===// - * - * The LLVM Compiler Infrastructure - * - * This file was developed by the LLVM research group and is distributed under - * the University of Illinois Open Source License. See LICENSE.TXT for details. - * - *===----------------------------------------------------------------------===// - * This header file is the autoconf substitute for sys/types.h. It - * includes it for us if it exists on this system. - * - *===----------------------------------------------------------------------===// - */ - -#ifndef _CONFIG_SYS_TYPES_H -#define _CONFIG_SYS_TYPES_H - -#include "Config/config.h" - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -#endif - diff --git a/include/Config/sys/wait.h b/include/Config/sys/wait.h deleted file mode 100644 index b3db60e435c..00000000000 --- a/include/Config/sys/wait.h +++ /dev/null @@ -1,24 +0,0 @@ -/*===-- Config/sys/wait.h ---------------------------------------*- C++ -*-===// - * - * The LLVM Compiler Infrastructure - * - * This file was developed by the LLVM research group and is distributed under - * the University of Illinois Open Source License. See LICENSE.TXT for details. - * - *===----------------------------------------------------------------------===// - * This header file includes the headers needed for the wait() system - * call. - *===----------------------------------------------------------------------===// - */ - -#ifndef _CONFIG_SYS_WAIT_H -#define _CONFIG_SYS_WAIT_H - -#include "Config/config.h" - -#ifdef HAVE_SYS_WAIT_H -#include -#endif - -#endif - diff --git a/include/Config/time.h b/include/Config/time.h deleted file mode 100644 index b2f3e6ee053..00000000000 --- a/include/Config/time.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * The LLVM Compiler Infrastructure - * - * This file was developed by the LLVM research group and is distributed under - * the University of Illinois Open Source License. See LICENSE.TXT for details. - * - *===----------------------------------------------------------------------===// - * - * Description: - * This header file is the autoconf replacement for time.h (if it lives - * on the system). - * - * The added benefit of this header file is that it removes the - * "time with sys/time" problem. - * - * According to the autoconf manual, some systems have a sys/time.h that - * includes time.h, but time.h is not written to handle multiple - * inclusion. This means that a program including sys/time.h cannot - * also include time.h. - * - * This header file fixes that problem. - */ - -#ifndef _CONFIG_TIME_H -#define _CONFIG_TIME_H - -#include "Config/config.h" - -#ifdef HAVE_TIME_H -#include -#endif - -#endif diff --git a/include/Config/unistd.h b/include/Config/unistd.h deleted file mode 100644 index 847db7a3c6e..00000000000 --- a/include/Config/unistd.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * The LLVM Compiler Infrastructure - * - * This file was developed by the LLVM research group and is distributed under - * the University of Illinois Open Source License. See LICENSE.TXT for details. - * - *===----------------------------------------------------------------------===// - * - * Description: - * This header file is the autoconf replacement for unistd.h (if it lives - * on the system). - */ - -#ifndef _CONFIG_UNISTD_H -#define _CONFIG_UNISTD_H - -#include "Config/config.h" - -#if defined(HAVE_UNISTD_H) && !defined(_MSC_VER) -#include -#endif - -#ifdef _WIN32 -#include -#include -#endif - -#endif diff --git a/include/Config/windows.h b/include/Config/windows.h deleted file mode 100644 index fded99fba8e..00000000000 --- a/include/Config/windows.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * The LLVM Compiler Infrastructure - * - * This file was developed by the LLVM research group and is distributed under - * the University of Illinois Open Source License. See LICENSE.TXT for details. - * - ****************************************************************************** - * - * Description: - * This header file is the autoconf replacement for windows.h (if it lives - * on the system). - */ - -#ifndef LLVM_CONFIG_WINDOWS_H -#define LLVM_CONFIG_WINDOWS_H - -#include "Config/config.h" - -#ifdef HAVE_WINDOWS_H -#include -#undef min -#undef max -#endif - -#endif diff --git a/include/Support/Annotation.h b/include/Support/Annotation.h deleted file mode 100644 index efca20a3ec0..00000000000 --- a/include/Support/Annotation.h +++ /dev/null @@ -1,217 +0,0 @@ -//===-- Support/Annotation.h - Annotation classes ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declarations for two classes: Annotation & Annotable. -// Using these two simple classes, anything that derives from Annotable can have -// Annotation subclasses attached to them, ready for easy retrieval. -// -// Annotations are designed to be easily attachable to various classes. -// -// The AnnotationManager class is essential for using these classes. It is -// responsible for turning Annotation name strings into tokens [unique id #'s] -// that may be used to search for and create annotations. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_ANNOTATION_H -#define SUPPORT_ANNOTATION_H - -#include -#include - -namespace llvm { - -class AnnotationID; -class Annotation; -class Annotable; -class AnnotationManager; - -//===----------------------------------------------------------------------===// -// -// AnnotationID - This class is a thin wrapper around an unsigned integer that -// is used to hopefully prevent errors using AnnotationID's. They may be copied -// freely around and passed byvalue with little or no overhead. -// -class AnnotationID { - friend class AnnotationManager; - unsigned ID; - - AnnotationID(); // Default ctor is disabled - inline AnnotationID(unsigned i) : ID(i) {} // Only creatable from AnnMgr -public: - inline AnnotationID(const AnnotationID &A) : ID(A.ID) {} - - inline bool operator==(const AnnotationID &A) const { - return A.ID == ID; - } - inline bool operator<(const AnnotationID &A) const { - return ID < A.ID; - } -}; - - -//===----------------------------------------------------------------------===// -// -// Annotation Class - This class serves as a base class for any specific -// annotations that you might need. Simply subclass this to add extra -// information to the annotations. -// -class Annotation { - friend class Annotable; // Annotable manipulates Next list - AnnotationID ID; // ID number, as obtained from AnnotationManager - Annotation *Next; // The next annotation in the linked list -public: - inline Annotation(AnnotationID id) : ID(id), Next(0) {} - virtual ~Annotation(); // Designed to be subclassed - - // getID - Return the unique ID# of this annotation - inline AnnotationID getID() const { return ID; } - - // getNext - Return the next annotation in the list... - inline Annotation *getNext() const { return Next; } -}; - - -//===----------------------------------------------------------------------===// -// -// Annotable - This class is used as a base class for all objects that would -// like to have annotation capability. One notable subclass is Value, which -// means annotations can be attached to almost everything in LLVM. -// -// Annotable objects keep their annotation list sorted as annotations are -// inserted and deleted. This is used to ensure that annotations with identical -// ID#'s are stored sequentially. -// -class Annotable { - mutable Annotation *AnnotationList; - - Annotable(const Annotable &); // Do not implement - void operator=(const Annotable &); // Do not implement -public: - Annotable() : AnnotationList(0) {} - ~Annotable(); - - // getAnnotation - Search the list for annotations of the specified ID. The - // pointer returned is either null (if no annotations of the specified ID - // exist), or it points to the first element of a potentially list of elements - // with identical ID #'s. - // - Annotation *getAnnotation(AnnotationID ID) const { - for (Annotation *A = AnnotationList; A; A = A->getNext()) - if (A->getID() == ID) return A; - return 0; - } - - // getOrCreateAnnotation - Search through the annotation list, if there is - // no annotation with the specified ID, then use the AnnotationManager to - // create one. - // - inline Annotation *getOrCreateAnnotation(AnnotationID ID) const; - - // addAnnotation - Insert the annotation into the list in a sorted location. - // - void addAnnotation(Annotation *A) const { - assert(A->Next == 0 && "Annotation already in list?!?"); - - Annotation **AL = &AnnotationList; - while (*AL && (*AL)->ID < A->getID()) // Find where to insert annotation - AL = &((*AL)->Next); - A->Next = *AL; // Link the annotation in - *AL = A; - } - - // unlinkAnnotation - Remove the first annotation of the specified ID... and - // then return the unlinked annotation. The annotation object is not deleted. - // - inline Annotation *unlinkAnnotation(AnnotationID ID) const { - for (Annotation **A = &AnnotationList; *A; A = &((*A)->Next)) - if ((*A)->getID() == ID) { - Annotation *Ret = *A; - *A = Ret->Next; - Ret->Next = 0; - return Ret; - } - return 0; - } - - // deleteAnnotation - Delete the first annotation of the specified ID in the - // list. Unlink unlinkAnnotation, this actually deletes the annotation object - // - bool deleteAnnotation(AnnotationID ID) const { - Annotation *A = unlinkAnnotation(ID); - delete A; - return A != 0; - } -}; - - -//===----------------------------------------------------------------------===// -// -// AnnotationManager - This class is primarily responsible for maintaining a -// one-to-one mapping between string Annotation names and Annotation ID numbers. -// -// Compared to the rest of the Annotation system, these mapping methods are -// relatively slow, so they should be avoided by locally caching Annotation -// ID #'s. These methods are safe to call at any time, even by static ctors, so -// they should be used by static ctors most of the time. -// -// This class also provides support for annotations that are created on demand -// by the Annotable::getOrCreateAnnotation method. To get this to work, simply -// register an annotation handler -// -struct AnnotationManager { - typedef Annotation *(*Factory)(AnnotationID, const Annotable *, void*); - - //===--------------------------------------------------------------------===// - // Basic ID <-> Name map functionality - - static AnnotationID getID(const std::string &Name); // Name -> ID - static const std::string &getName(AnnotationID ID); // ID -> Name - - // getID - Name -> ID + registration of a factory function for demand driven - // annotation support. - static AnnotationID getID(const std::string &Name, Factory Fact, - void *Data = 0); - - //===--------------------------------------------------------------------===// - // Annotation creation on demand support... - - // registerAnnotationFactory - This method is used to register a callback - // function used to create an annotation on demand if it is needed by the - // Annotable::getOrCreateAnnotation method. - // - static void registerAnnotationFactory(AnnotationID ID, Factory Func, - void *ExtraData = 0); - - // createAnnotation - Create an annotation of the specified ID for the - // specified object, using a register annotation creation function. - // - static Annotation *createAnnotation(AnnotationID ID, const Annotable *Obj); -}; - - - -// getOrCreateAnnotation - Search through the annotation list, if there is -// no annotation with the specified ID, then use the AnnotationManager to -// create one. -// -inline Annotation *Annotable::getOrCreateAnnotation(AnnotationID ID) const { - Annotation *A = getAnnotation(ID); // Fast path, check for preexisting ann - if (A) return A; - - // No annotation found, ask the annotation manager to create an annotation... - A = AnnotationManager::createAnnotation(ID, this); - assert(A && "AnnotationManager could not create annotation!"); - addAnnotation(A); - return A; -} - -} // End namespace llvm - -#endif diff --git a/include/Support/BitSetVector.h b/include/Support/BitSetVector.h deleted file mode 100644 index 276af0a68a6..00000000000 --- a/include/Support/BitSetVector.h +++ /dev/null @@ -1,272 +0,0 @@ -//===-- BitVectorSet.h - A bit-vector representation of sets ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This is an implementation of the bit-vector representation of sets. Unlike -// vector, this allows much more efficient parallel set operations on -// bits, by using the bitset template. The bitset template unfortunately can -// only represent sets with a size chosen at compile-time. We therefore use a -// vector of bitsets. The maxmimum size of our sets (i.e., the size of the -// universal set) can be chosen at creation time. -// -// External functions: -// -// bool Disjoint(const BitSetVector& set1, const BitSetVector& set2): -// Tests if two sets have an empty intersection. -// This is more efficient than !(set1 & set2).any(). -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_BITSETVECTOR_H -#define SUPPORT_BITSETVECTOR_H - -#include -#include -#include -#include - -namespace llvm { - -class BitSetVector { - enum { BITSET_WORDSIZE = sizeof(long)*8 }; - - // Types used internal to the representation - typedef std::bitset bitword; - typedef bitword::reference reference; - - // Data used in the representation - std::vector bitsetVec; - unsigned maxSize; - -private: - // Utility functions for the representation - static unsigned NumWords(unsigned Size) { - return (Size+BITSET_WORDSIZE-1)/BITSET_WORDSIZE; - } - static unsigned LastWordSize(unsigned Size) { return Size % BITSET_WORDSIZE; } - - // Clear the unused bits in the last word. - // The unused bits are the high (BITSET_WORDSIZE - LastWordSize()) bits - void ClearUnusedBits() { - unsigned long usedBits = (1U << LastWordSize(size())) - 1; - bitsetVec.back() &= bitword(usedBits); - } - - const bitword& getWord(unsigned i) const { return bitsetVec[i]; } - bitword& getWord(unsigned i) { return bitsetVec[i]; } - - friend bool Disjoint(const BitSetVector& set1, - const BitSetVector& set2); - - BitSetVector(); // do not implement! - -public: - class iterator; - /// - /// Constructor: create a set of the maximum size maxSetSize. - /// The set is initialized to empty. - /// - BitSetVector(unsigned maxSetSize) - : bitsetVec(NumWords(maxSetSize)), maxSize(maxSetSize) { } - - /// size - Return the number of bits tracked by this bit vector... - unsigned size() const { return maxSize; } - - /// - /// Modifier methods: reset, set for entire set, operator[] for one element. - /// - void reset() { - for (unsigned i=0, N = bitsetVec.size(); i < N; ++i) - bitsetVec[i].reset(); - } - void set() { - for (unsigned i=0, N = bitsetVec.size(); i < N; ++i) // skip last word - bitsetVec[i].set(); - ClearUnusedBits(); - } - reference operator[](unsigned n) { - assert(n < size() && "BitSetVector: Bit number out of range"); - unsigned ndiv = n / BITSET_WORDSIZE, nmod = n % BITSET_WORDSIZE; - return bitsetVec[ndiv][nmod]; - } - iterator begin() { return iterator::begin(*this); } - iterator end() { return iterator::end(*this); } - - /// - /// Comparison operations: equal, not equal - /// - bool operator == (const BitSetVector& set2) const { - assert(maxSize == set2.maxSize && "Illegal == comparison"); - for (unsigned i = 0; i < bitsetVec.size(); ++i) - if (getWord(i) != set2.getWord(i)) - return false; - return true; - } - bool operator != (const BitSetVector& set2) const { - return ! (*this == set2); - } - - /// - /// Set membership operations: single element, any, none, count - /// - bool test(unsigned n) const { - assert(n < size() && "BitSetVector: Bit number out of range"); - unsigned ndiv = n / BITSET_WORDSIZE, nmod = n % BITSET_WORDSIZE; - return bitsetVec[ndiv].test(nmod); - } - bool any() const { - for (unsigned i = 0; i < bitsetVec.size(); ++i) - if (bitsetVec[i].any()) - return true; - return false; - } - bool none() const { - return ! any(); - } - unsigned count() const { - unsigned n = 0; - for (unsigned i = 0; i < bitsetVec.size(); ++i) - n += bitsetVec[i].count(); - return n; - } - bool all() const { - return (count() == size()); - } - - /// - /// Set operations: intersection, union, disjoint union, complement. - /// - BitSetVector operator& (const BitSetVector& set2) const { - assert(maxSize == set2.maxSize && "Illegal intersection"); - BitSetVector result(maxSize); - for (unsigned i = 0; i < bitsetVec.size(); ++i) - result.getWord(i) = getWord(i) & set2.getWord(i); - return result; - } - BitSetVector operator| (const BitSetVector& set2) const { - assert(maxSize == set2.maxSize && "Illegal intersection"); - BitSetVector result(maxSize); - for (unsigned i = 0; i < bitsetVec.size(); ++i) - result.getWord(i) = getWord(i) | set2.getWord(i); - return result; - } - BitSetVector operator^ (const BitSetVector& set2) const { - assert(maxSize == set2.maxSize && "Illegal intersection"); - BitSetVector result(maxSize); - for (unsigned i = 0; i < bitsetVec.size(); ++i) - result.getWord(i) = getWord(i) ^ set2.getWord(i); - return result; - } - BitSetVector operator~ () const { - BitSetVector result(maxSize); - for (unsigned i = 0; i < bitsetVec.size(); ++i) - (result.getWord(i) = getWord(i)).flip(); - result.ClearUnusedBits(); - return result; - } - - /// - /// Printing and debugging support - /// - void print(std::ostream &O) const; - void dump() const { print(std::cerr); } - -public: - // - // An iterator to enumerate the bits in a BitSetVector. - // Eventually, this needs to inherit from bidirectional_iterator. - // But this iterator may not be as useful as I once thought and - // may just go away. - // - class iterator { - unsigned currentBit; - unsigned currentWord; - BitSetVector* bitvec; - iterator(unsigned B, unsigned W, BitSetVector& _bitvec) - : currentBit(B), currentWord(W), bitvec(&_bitvec) { } - public: - iterator(BitSetVector& _bitvec) - : currentBit(0), currentWord(0), bitvec(&_bitvec) { } - iterator(const iterator& I) - : currentBit(I.currentBit),currentWord(I.currentWord),bitvec(I.bitvec) { } - iterator& operator=(const iterator& I) { - currentWord = I.currentWord; - currentBit = I.currentBit; - bitvec = I.bitvec; - return *this; - } - - // Increment and decrement operators (pre and post) - iterator& operator++() { - if (++currentBit == BITSET_WORDSIZE) - { currentBit = 0; if (currentWord < bitvec->size()) ++currentWord; } - return *this; - } - iterator& operator--() { - if (currentBit == 0) { - currentBit = BITSET_WORDSIZE-1; - currentWord = (currentWord == 0)? bitvec->size() : --currentWord; - } - else - --currentBit; - return *this; - } - iterator operator++(int) { iterator copy(*this); ++*this; return copy; } - iterator operator--(int) { iterator copy(*this); --*this; return copy; } - - // Dereferencing operators - reference operator*() { - assert(currentWord < bitvec->size() && - "Dereferencing iterator past the end of a BitSetVector"); - return bitvec->getWord(currentWord)[currentBit]; - } - - // Comparison operator - bool operator==(const iterator& I) { - return (I.bitvec == bitvec && - I.currentWord == currentWord && I.currentBit == currentBit); - } - - protected: - static iterator begin(BitSetVector& _bitvec) { return iterator(_bitvec); } - static iterator end(BitSetVector& _bitvec) { return iterator(0, - _bitvec.size(), _bitvec); } - friend class BitSetVector; - }; -}; - - -inline void BitSetVector::print(std::ostream& O) const -{ - for (std::vector::const_iterator - I=bitsetVec.begin(), E=bitsetVec.end(); I != E; ++I) - O << "<" << (*I) << ">" << (I+1 == E? "\n" : ", "); -} - -inline std::ostream& operator<< (std::ostream& O, const BitSetVector& bset) -{ - bset.print(O); - return O; -}; - - -/// -/// Optimized versions of fundamental comparison operations -/// -inline bool Disjoint(const BitSetVector& set1, - const BitSetVector& set2) -{ - assert(set1.size() == set2.size() && "Illegal intersection"); - for (unsigned i = 0; i < set1.bitsetVec.size(); ++i) - if ((set1.getWord(i) & set2.getWord(i)).any()) - return false; - return true; -} - -} // End llvm namespace -#endif diff --git a/include/Support/Casting.h b/include/Support/Casting.h deleted file mode 100644 index abc80aac7af..00000000000 --- a/include/Support/Casting.h +++ /dev/null @@ -1,301 +0,0 @@ -//===-- Support/Casting.h - Allow flexible, checked, casts ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the isa(), cast(), dyn_cast(), cast_or_null(), -// and dyn_cast_or_null() templates. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_CASTING_H -#define SUPPORT_CASTING_H - -namespace llvm { - -//===----------------------------------------------------------------------===// -// isa Support Templates -//===----------------------------------------------------------------------===// - -template struct isa_impl_cl; - -// Define a template that can be specialized by smart pointers to reflect the -// fact that they are automatically dereferenced, and are not involved with the -// template selection process... the default implementation is a noop. -// -template struct simplify_type { - typedef From SimpleType; // The real type this represents... - - // An accessor to get the real value... - static SimpleType &getSimplifiedValue(From &Val) { return Val; } -}; - -template struct simplify_type { - typedef const From SimpleType; - static SimpleType &getSimplifiedValue(const From &Val) { - return simplify_type::getSimplifiedValue(static_cast(Val)); - } -}; - - -// isa - Return true if the parameter to the template is an instance of the -// template type argument. Used like this: -// -// if (isa(myVal)) { ... } -// -template -inline bool isa_impl(const From &Val) { - return To::classof(&Val); -} - -template -struct isa_impl_wrap { - // When From != SimplifiedType, we can simplify the type some more by using - // the simplify_type template. - static bool doit(const From &Val) { - return isa_impl_cl::template - isa(simplify_type::getSimplifiedValue(Val)); - } -}; - -template -struct isa_impl_wrap { - // When From == SimpleType, we are as simple as we are going to get. - static bool doit(const FromTy &Val) { - return isa_impl(Val); - } -}; - -// isa_impl_cl - Use class partial specialization to transform types to a single -// canonical form for isa_impl. -// -template -struct isa_impl_cl { - template - static bool isa(const FromCl &Val) { - return isa_impl_wrap::SimpleType>::doit(Val); - } -}; - -// Specialization used to strip const qualifiers off of the FromCl type... -template -struct isa_impl_cl { - template - static bool isa(const FromCl &Val) { - return isa_impl_cl::template isa(Val); - } -}; - -// Define pointer traits in terms of base traits... -template -struct isa_impl_cl { - template - static bool isa(FromCl *Val) { - return isa_impl_cl::template isa(*Val); - } -}; - -// Define reference traits in terms of base traits... -template -struct isa_impl_cl { - template - static bool isa(FromCl &Val) { - return isa_impl_cl::template isa(&Val); - } -}; - -template -inline bool isa(const Y &Val) { - return isa_impl_cl::template isa(Val); -} - -//===----------------------------------------------------------------------===// -// cast Support Templates -//===----------------------------------------------------------------------===// - -template struct cast_retty; - - -// Calculate what type the 'cast' function should return, based on a requested -// type of To and a source type of From. -template struct cast_retty_impl { - typedef To& ret_type; // Normal case, return Ty& -}; -template struct cast_retty_impl { - typedef const To &ret_type; // Normal case, return Ty& -}; - -template struct cast_retty_impl { - typedef To* ret_type; // Pointer arg case, return Ty* -}; - -template struct cast_retty_impl { - typedef const To* ret_type; // Constant pointer arg case, return const Ty* -}; - -template struct cast_retty_impl { - typedef const To* ret_type; // Constant pointer arg case, return const Ty* -}; - - -template -struct cast_retty_wrap { - // When the simplified type and the from type are not the same, use the type - // simplifier to reduce the type, then reuse cast_retty_impl to get the - // resultant type. - typedef typename cast_retty::ret_type ret_type; -}; - -template -struct cast_retty_wrap { - // When the simplified type is equal to the from type, use it directly. - typedef typename cast_retty_impl::ret_type ret_type; -}; - -template -struct cast_retty { - typedef typename cast_retty_wrap::SimpleType>::ret_type ret_type; -}; - -// Ensure the non-simple values are converted using the simplify_type template -// that may be specialized by smart pointers... -// -template struct cast_convert_val { - // This is not a simple type, use the template to simplify it... - static typename cast_retty::ret_type doit(const From &Val) { - return cast_convert_val::SimpleType>::doit( - simplify_type::getSimplifiedValue(Val)); - } -}; - -template struct cast_convert_val { - // This _is_ a simple type, just cast it. - static typename cast_retty::ret_type doit(const FromTy &Val) { - return reinterpret_cast::ret_type>( - const_cast(Val)); - } -}; - - - -// cast - Return the argument parameter cast to the specified type. This -// casting operator asserts that the type is correct, so it does not return null -// on failure. But it will correctly return NULL when the input is NULL. -// Used Like this: -// -// cast(myVal)->getParent() -// -template -inline typename cast_retty::ret_type cast(const Y &Val) { - assert(isa(Val) && "cast() argument of incompatible type!"); - return cast_convert_val::SimpleType>::doit(Val); -} - -// cast_or_null - Functionally identical to cast, except that a null value is -// accepted. -// -template -inline typename cast_retty::ret_type cast_or_null(Y *Val) { - if (Val == 0) return 0; - assert(isa(Val) && "cast_or_null() argument of incompatible type!"); - return cast(Val); -} - - -// dyn_cast - Return the argument parameter cast to the specified type. This -// casting operator returns null if the argument is of the wrong type, so it can -// be used to test for a type as well as cast if successful. This should be -// used in the context of an if statement like this: -// -// if (const Instruction *I = dyn_cast(myVal)) { ... } -// - -template -inline typename cast_retty::ret_type dyn_cast(Y Val) { - return isa(Val) ? cast(Val) : 0; -} - -// dyn_cast_or_null - Functionally identical to dyn_cast, except that a null -// value is accepted. -// -template -inline typename cast_retty::ret_type dyn_cast_or_null(Y Val) { - return (Val && isa(Val)) ? cast(Val) : 0; -} - - -#ifdef DEBUG_CAST_OPERATORS -#include - -struct bar { - bar() {} -private: - bar(const bar &); -}; -struct foo { - void ext() const; - /* static bool classof(const bar *X) { - cerr << "Classof: " << X << "\n"; - return true; - }*/ -}; - -template <> inline bool isa_impl(const bar &Val) { - cerr << "Classof: " << &Val << "\n"; - return true; -} - - -bar *fub(); -void test(bar &B1, const bar *B2) { - // test various configurations of const - const bar &B3 = B1; - const bar *const B4 = B2; - - // test isa - if (!isa(B1)) return; - if (!isa(B2)) return; - if (!isa(B3)) return; - if (!isa(B4)) return; - - // test cast - foo &F1 = cast(B1); - const foo *F3 = cast(B2); - const foo *F4 = cast(B2); - const foo &F8 = cast(B3); - const foo *F9 = cast(B4); - foo *F10 = cast(fub()); - - // test cast_or_null - const foo *F11 = cast_or_null(B2); - const foo *F12 = cast_or_null(B2); - const foo *F13 = cast_or_null(B4); - const foo *F14 = cast_or_null(fub()); // Shouldn't print. - - // These lines are errors... - //foo *F20 = cast(B2); // Yields const foo* - //foo &F21 = cast(B3); // Yields const foo& - //foo *F22 = cast(B4); // Yields const foo* - //foo &F23 = cast_or_null(B1); - //const foo &F24 = cast_or_null(B3); -} - -bar *fub() { return 0; } -void main() { - bar B; - test(B, &B); -} - -#endif - -} // End llvm namespace - -#endif diff --git a/include/Support/CommandLine.h b/include/Support/CommandLine.h deleted file mode 100644 index 053b823669e..00000000000 --- a/include/Support/CommandLine.h +++ /dev/null @@ -1,1049 +0,0 @@ -//===- Support/CommandLine.h - Flexible Command line parser -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This class implements a command line argument processor that is useful when -// creating a tool. It provides a simple, minimalistic interface that is easily -// extensible and supports nonlocal (library) command line options. -// -// Note that rather than trying to figure out what this code does, you should -// read the library documentation located in docs/CommandLine.html or looks at -// the many example usages in tools/*/*.cpp -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_COMMANDLINE_H -#define SUPPORT_COMMANDLINE_H - -#include "Support/type_traits.h" -#include -#include -#include -#include -#include - -namespace llvm { - -/// cl Namespace - This namespace contains all of the command line option -/// processing machinery. It is intentionally a short name to make qualified -/// usage concise. -namespace cl { - -//===----------------------------------------------------------------------===// -// ParseCommandLineOptions - Command line option processing entry point. -// -void ParseCommandLineOptions(int &argc, char **argv, - const char *Overview = 0); - -//===----------------------------------------------------------------------===// -// ParseEnvironmentOptions - Environment variable option processing alternate -// entry point. -// -void ParseEnvironmentOptions(const char *progName, const char *envvar, - const char *Overview = 0); - -//===----------------------------------------------------------------------===// -// Flags permitted to be passed to command line arguments -// - -enum NumOccurrences { // Flags for the number of occurrences allowed - Optional = 0x01, // Zero or One occurrence - ZeroOrMore = 0x02, // Zero or more occurrences allowed - Required = 0x03, // One occurrence required - OneOrMore = 0x04, // One or more occurrences required - - // ConsumeAfter - Indicates that this option is fed anything that follows the - // last positional argument required by the application (it is an error if - // there are zero positional arguments, and a ConsumeAfter option is used). - // Thus, for example, all arguments to LLI are processed until a filename is - // found. Once a filename is found, all of the succeeding arguments are - // passed, unprocessed, to the ConsumeAfter option. - // - ConsumeAfter = 0x05, - - OccurrencesMask = 0x07, -}; - -enum ValueExpected { // Is a value required for the option? - ValueOptional = 0x08, // The value can appear... or not - ValueRequired = 0x10, // The value is required to appear! - ValueDisallowed = 0x18, // A value may not be specified (for flags) - ValueMask = 0x18, -}; - -enum OptionHidden { // Control whether -help shows this option - NotHidden = 0x20, // Option included in --help & --help-hidden - Hidden = 0x40, // -help doesn't, but --help-hidden does - ReallyHidden = 0x60, // Neither --help nor --help-hidden show this arg - HiddenMask = 0x60, -}; - -// Formatting flags - This controls special features that the option might have -// that cause it to be parsed differently... -// -// Prefix - This option allows arguments that are otherwise unrecognized to be -// matched by options that are a prefix of the actual value. This is useful for -// cases like a linker, where options are typically of the form '-lfoo' or -// '-L../../include' where -l or -L are the actual flags. When prefix is -// enabled, and used, the value for the flag comes from the suffix of the -// argument. -// -// Grouping - With this option enabled, multiple letter options are allowed to -// bunch together with only a single hyphen for the whole group. This allows -// emulation of the behavior that ls uses for example: ls -la === ls -l -a -// - -enum FormattingFlags { - NormalFormatting = 0x000, // Nothing special - Positional = 0x080, // Is a positional argument, no '-' required - Prefix = 0x100, // Can this option directly prefix its value? - Grouping = 0x180, // Can this option group with other options? - FormattingMask = 0x180, // Union of the above flags. -}; - -enum MiscFlags { // Miscellaneous flags to adjust argument - CommaSeparated = 0x200, // Should this cl::list split between commas? - PositionalEatsArgs = 0x400, // Should this positional cl::list eat -args? - MiscMask = 0x600, // Union of the above flags. -}; - - - -//===----------------------------------------------------------------------===// -// Option Base class -// -class alias; -class Option { - friend void cl::ParseCommandLineOptions(int &, char **, const char *); - friend class alias; - - // handleOccurrences - Overriden by subclasses to handle the value passed into - // an argument. Should return true if there was an error processing the - // argument and the program should exit. - // - virtual bool handleOccurrence(unsigned pos, const char *ArgName, - const std::string &Arg) = 0; - - virtual enum NumOccurrences getNumOccurrencesFlagDefault() const { - return Optional; - } - virtual enum ValueExpected getValueExpectedFlagDefault() const { - return ValueOptional; - } - virtual enum OptionHidden getOptionHiddenFlagDefault() const { - return NotHidden; - } - virtual enum FormattingFlags getFormattingFlagDefault() const { - return NormalFormatting; - } - - int NumOccurrences; // The number of times specified - int Flags; // Flags for the argument - unsigned Position; // Position of last occurrence of the option -public: - const char *ArgStr; // The argument string itself (ex: "help", "o") - const char *HelpStr; // The descriptive text message for --help - const char *ValueStr; // String describing what the value of this option is - - inline enum NumOccurrences getNumOccurrencesFlag() const { - int NO = Flags & OccurrencesMask; - return NO ? static_cast(NO) - : getNumOccurrencesFlagDefault(); - } - inline enum ValueExpected getValueExpectedFlag() const { - int VE = Flags & ValueMask; - return VE ? static_cast(VE) - : getValueExpectedFlagDefault(); - } - inline enum OptionHidden getOptionHiddenFlag() const { - int OH = Flags & HiddenMask; - return OH ? static_cast(OH) - : getOptionHiddenFlagDefault(); - } - inline enum FormattingFlags getFormattingFlag() const { - int OH = Flags & FormattingMask; - return OH ? static_cast(OH) - : getFormattingFlagDefault(); - } - inline unsigned getMiscFlags() const { - return Flags & MiscMask; - } - inline unsigned getPosition() const { return Position; } - - // hasArgStr - Return true if the argstr != "" - bool hasArgStr() const { return ArgStr[0] != 0; } - - //-------------------------------------------------------------------------=== - // Accessor functions set by OptionModifiers - // - void setArgStr(const char *S) { ArgStr = S; } - void setDescription(const char *S) { HelpStr = S; } - void setValueStr(const char *S) { ValueStr = S; } - - void setFlag(unsigned Flag, unsigned FlagMask) { - if (Flags & FlagMask) { - error(": Specified two settings for the same option!"); - exit(1); - } - - Flags |= Flag; - } - - void setNumOccurrencesFlag(enum NumOccurrences Val) { - setFlag(Val, OccurrencesMask); - } - void setValueExpectedFlag(enum ValueExpected Val) { setFlag(Val, ValueMask); } - void setHiddenFlag(enum OptionHidden Val) { setFlag(Val, HiddenMask); } - void setFormattingFlag(enum FormattingFlags V) { setFlag(V, FormattingMask); } - void setMiscFlag(enum MiscFlags M) { setFlag(M, M); } - void setPosition(unsigned pos) { Position = pos; } -protected: - Option() : NumOccurrences(0), Flags(0), Position(0), - ArgStr(""), HelpStr(""), ValueStr("") {} - -public: - // addArgument - Tell the system that this Option subclass will handle all - // occurrences of -ArgStr on the command line. - // - void addArgument(const char *ArgStr); - void removeArgument(const char *ArgStr); - - // Return the width of the option tag for printing... - virtual unsigned getOptionWidth() const = 0; - - // printOptionInfo - Print out information about this option. The - // to-be-maintained width is specified. - // - virtual void printOptionInfo(unsigned GlobalWidth) const = 0; - - // addOccurrence - Wrapper around handleOccurrence that enforces Flags - // - bool addOccurrence(unsigned pos, const char *ArgName, - const std::string &Value); - - // Prints option name followed by message. Always returns true. - bool error(std::string Message, const char *ArgName = 0); - -public: - inline int getNumOccurrences() const { return NumOccurrences; } - virtual ~Option() {} -}; - - -//===----------------------------------------------------------------------===// -// Command line option modifiers that can be used to modify the behavior of -// command line option parsers... -// - -// desc - Modifier to set the description shown in the --help output... -struct desc { - const char *Desc; - desc(const char *Str) : Desc(Str) {} - void apply(Option &O) const { O.setDescription(Desc); } -}; - -// value_desc - Modifier to set the value description shown in the --help -// output... -struct value_desc { - const char *Desc; - value_desc(const char *Str) : Desc(Str) {} - void apply(Option &O) const { O.setValueStr(Desc); } -}; - -// init - Specify a default (initial) value for the command line argument, if -// the default constructor for the argument type does not give you what you -// want. This is only valid on "opt" arguments, not on "list" arguments. -// -template -struct initializer { - const Ty &Init; - initializer(const Ty &Val) : Init(Val) {} - - template - void apply(Opt &O) const { O.setInitialValue(Init); } -}; - -template -initializer init(const Ty &Val) { - return initializer(Val); -} - - -// location - Allow the user to specify which external variable they want to -// store the results of the command line argument processing into, if they don't -// want to store it in the option itself. -// -template -struct LocationClass { - Ty &Loc; - LocationClass(Ty &L) : Loc(L) {} - - template - void apply(Opt &O) const { O.setLocation(O, Loc); } -}; - -template -LocationClass location(Ty &L) { return LocationClass(L); } - - -//===----------------------------------------------------------------------===// -// Enum valued command line option -// -#define clEnumVal(ENUMVAL, DESC) #ENUMVAL, (int)ENUMVAL, DESC -#define clEnumValN(ENUMVAL, FLAGNAME, DESC) FLAGNAME, (int)ENUMVAL, DESC -#define clEnumValEnd ((void*)0) - -// values - For custom data types, allow specifying a group of values together -// as the values that go into the mapping that the option handler uses. Note -// that the values list must always have a 0 at the end of the list to indicate -// that the list has ended. -// -template -class ValuesClass { - // Use a vector instead of a map, because the lists should be short, - // the overhead is less, and most importantly, it keeps them in the order - // inserted so we can print our option out nicely. - std::vector > > Values; - void processValues(va_list Vals); -public: - ValuesClass(const char *EnumName, DataType Val, const char *Desc, - va_list ValueArgs) { - // Insert the first value, which is required. - Values.push_back(std::make_pair(EnumName, std::make_pair(Val, Desc))); - - // Process the varargs portion of the values... - while (const char *EnumName = va_arg(ValueArgs, const char *)) { - DataType EnumVal = static_cast(va_arg(ValueArgs, int)); - const char *EnumDesc = va_arg(ValueArgs, const char *); - Values.push_back(std::make_pair(EnumName, // Add value to value map - std::make_pair(EnumVal, EnumDesc))); - } - } - - template - void apply(Opt &O) const { - for (unsigned i = 0, e = Values.size(); i != e; ++i) - O.getParser().addLiteralOption(Values[i].first, Values[i].second.first, - Values[i].second.second); - } -}; - -template -ValuesClass values(const char *Arg, DataType Val, const char *Desc, - ...) { - va_list ValueArgs; - va_start(ValueArgs, Desc); - ValuesClass Vals(Arg, Val, Desc, ValueArgs); - va_end(ValueArgs); - return Vals; -} - - -//===----------------------------------------------------------------------===// -// parser class - Parameterizable parser for different data types. By default, -// known data types (string, int, bool) have specialized parsers, that do what -// you would expect. The default parser, used for data types that are not -// built-in, uses a mapping table to map specific options to values, which is -// used, among other things, to handle enum types. - -//-------------------------------------------------- -// generic_parser_base - This class holds all the non-generic code that we do -// not need replicated for every instance of the generic parser. This also -// allows us to put stuff into CommandLine.cpp -// -struct generic_parser_base { - virtual ~generic_parser_base() {} // Base class should have virtual-dtor - - // getNumOptions - Virtual function implemented by generic subclass to - // indicate how many entries are in Values. - // - virtual unsigned getNumOptions() const = 0; - - // getOption - Return option name N. - virtual const char *getOption(unsigned N) const = 0; - - // getDescription - Return description N - virtual const char *getDescription(unsigned N) const = 0; - - // Return the width of the option tag for printing... - virtual unsigned getOptionWidth(const Option &O) const; - - // printOptionInfo - Print out information about this option. The - // to-be-maintained width is specified. - // - virtual void printOptionInfo(const Option &O, unsigned GlobalWidth) const; - - void initialize(Option &O) { - // All of the modifiers for the option have been processed by now, so the - // argstr field should be stable, copy it down now. - // - hasArgStr = O.hasArgStr(); - - // If there has been no argstr specified, that means that we need to add an - // argument for every possible option. This ensures that our options are - // vectored to us. - // - if (!hasArgStr) - for (unsigned i = 0, e = getNumOptions(); i != e; ++i) - O.addArgument(getOption(i)); - } - - enum ValueExpected getValueExpectedFlagDefault() const { - // If there is an ArgStr specified, then we are of the form: - // - // -opt=O2 or -opt O2 or -optO2 - // - // In which case, the value is required. Otherwise if an arg str has not - // been specified, we are of the form: - // - // -O2 or O2 or -la (where -l and -a are separate options) - // - // If this is the case, we cannot allow a value. - // - if (hasArgStr) - return ValueRequired; - else - return ValueDisallowed; - } - - // findOption - Return the option number corresponding to the specified - // argument string. If the option is not found, getNumOptions() is returned. - // - unsigned findOption(const char *Name); - -protected: - bool hasArgStr; -}; - -// Default parser implementation - This implementation depends on having a -// mapping of recognized options to values of some sort. In addition to this, -// each entry in the mapping also tracks a help message that is printed with the -// command line option for --help. Because this is a simple mapping parser, the -// data type can be any unsupported type. -// -template -class parser : public generic_parser_base { -protected: - std::vector > > Values; -public: - typedef DataType parser_data_type; - - // Implement virtual functions needed by generic_parser_base - unsigned getNumOptions() const { return Values.size(); } - const char *getOption(unsigned N) const { return Values[N].first; } - const char *getDescription(unsigned N) const { - return Values[N].second.second; - } - - // parse - Return true on error. - bool parse(Option &O, const char *ArgName, const std::string &Arg, - DataType &V) { - std::string ArgVal; - if (hasArgStr) - ArgVal = Arg; - else - ArgVal = ArgName; - - for (unsigned i = 0, e = Values.size(); i != e; ++i) - if (ArgVal == Values[i].first) { - V = Values[i].second.first; - return false; - } - - return O.error(": Cannot find option named '" + ArgVal + "'!"); - } - - // addLiteralOption - Add an entry to the mapping table... - template - void addLiteralOption(const char *Name, const DT &V, const char *HelpStr) { - assert(findOption(Name) == Values.size() && "Option already exists!"); - Values.push_back(std::make_pair(Name, - std::make_pair(static_cast(V),HelpStr))); - } - - // removeLiteralOption - Remove the specified option. - // - void removeLiteralOption(const char *Name) { - unsigned N = findOption(Name); - assert(N != Values.size() && "Option not found!"); - Values.erase(Values.begin()+N); - } -}; - -//-------------------------------------------------- -// basic_parser - Super class of parsers to provide boilerplate code -// -struct basic_parser_impl { // non-template implementation of basic_parser - virtual ~basic_parser_impl() {} - - enum ValueExpected getValueExpectedFlagDefault() const { - return ValueRequired; - } - - void initialize(Option &O) {} - - // Return the width of the option tag for printing... - unsigned getOptionWidth(const Option &O) const; - - // printOptionInfo - Print out information about this option. The - // to-be-maintained width is specified. - // - void printOptionInfo(const Option &O, unsigned GlobalWidth) const; - - // getValueName - Overload in subclass to provide a better default value. - virtual const char *getValueName() const { return "value"; } -}; - -// basic_parser - The real basic parser is just a template wrapper that provides -// a typedef for the provided data type. -// -template -struct basic_parser : public basic_parser_impl { - typedef DataType parser_data_type; -}; - - -//-------------------------------------------------- -// parser -// -template<> -struct parser : public basic_parser { - - // parse - Return true on error. - bool parse(Option &O, const char *ArgName, const std::string &Arg, bool &Val); - - enum ValueExpected getValueExpectedFlagDefault() const { - return ValueOptional; - } - - // getValueName - Do not print = at all - virtual const char *getValueName() const { return 0; } -}; - - -//-------------------------------------------------- -// parser -// -template<> -struct parser : public basic_parser { - - // parse - Return true on error. - bool parse(Option &O, const char *ArgName, const std::string &Arg, int &Val); - - // getValueName - Overload in subclass to provide a better default value. - virtual const char *getValueName() const { return "int"; } -}; - - -//-------------------------------------------------- -// parser -// -template<> -struct parser : public basic_parser { - - // parse - Return true on error. - bool parse(Option &O, const char *AN, const std::string &Arg, unsigned &Val); - - // getValueName - Overload in subclass to provide a better default value. - virtual const char *getValueName() const { return "uint"; } -}; - - -//-------------------------------------------------- -// parser -// -template<> -struct parser : public basic_parser { - // parse - Return true on error. - bool parse(Option &O, const char *AN, const std::string &Arg, double &Val); - - // getValueName - Overload in subclass to provide a better default value. - virtual const char *getValueName() const { return "number"; } -}; - - -//-------------------------------------------------- -// parser -// -template<> -struct parser : public basic_parser { - // parse - Return true on error. - bool parse(Option &O, const char *AN, const std::string &Arg, float &Val); - - // getValueName - Overload in subclass to provide a better default value. - virtual const char *getValueName() const { return "number"; } -}; - - -//-------------------------------------------------- -// parser -// -template<> -struct parser : public basic_parser { - // parse - Return true on error. - bool parse(Option &O, const char *AN, const std::string &Arg, - std::string &Value) { - Value = Arg; - return false; - } - - // getValueName - Overload in subclass to provide a better default value. - virtual const char *getValueName() const { return "string"; } -}; - -//===----------------------------------------------------------------------===// -// applicator class - This class is used because we must use partial -// specialization to handle literal string arguments specially (const char* does -// not correctly respond to the apply method). Because the syntax to use this -// is a pain, we have the 'apply' method below to handle the nastiness... -// -template struct applicator { - template - static void opt(const Mod &M, Opt &O) { M.apply(O); } -}; - -// Handle const char* as a special case... -template struct applicator { - template - static void opt(const char *Str, Opt &O) { O.setArgStr(Str); } -}; -template struct applicator { - template - static void opt(const char *Str, Opt &O) { O.setArgStr(Str); } -}; -template<> struct applicator { - template - static void opt(const char *Str, Opt &O) { O.setArgStr(Str); } -}; - -template<> struct applicator { - static void opt(NumOccurrences NO, Option &O) { O.setNumOccurrencesFlag(NO); } -}; -template<> struct applicator { - static void opt(ValueExpected VE, Option &O) { O.setValueExpectedFlag(VE); } -}; -template<> struct applicator { - static void opt(OptionHidden OH, Option &O) { O.setHiddenFlag(OH); } -}; -template<> struct applicator { - static void opt(FormattingFlags FF, Option &O) { O.setFormattingFlag(FF); } -}; -template<> struct applicator { - static void opt(MiscFlags MF, Option &O) { O.setMiscFlag(MF); } -}; - -// apply method - Apply a modifier to an option in a type safe way. -template -void apply(const Mod &M, Opt *O) { - applicator::opt(M, *O); -} - - -//===----------------------------------------------------------------------===// -// opt_storage class - -// Default storage class definition: external storage. This implementation -// assumes the user will specify a variable to store the data into with the -// cl::location(x) modifier. -// -template -class opt_storage { - DataType *Location; // Where to store the object... - - void check() { - assert(Location != 0 && "cl::location(...) not specified for a command " - "line option with external storage, " - "or cl::init specified before cl::location()!!"); - } -public: - opt_storage() : Location(0) {} - - bool setLocation(Option &O, DataType &L) { - if (Location) - return O.error(": cl::location(x) specified more than once!"); - Location = &L; - return false; - } - - template - void setValue(const T &V) { - check(); - *Location = V; - } - - DataType &getValue() { check(); return *Location; } - const DataType &getValue() const { check(); return *Location; } -}; - - -// Define how to hold a class type object, such as a string. Since we can -// inherit from a class, we do so. This makes us exactly compatible with the -// object in all cases that it is used. -// -template -struct opt_storage : public DataType { - - template - void setValue(const T &V) { DataType::operator=(V); } - - DataType &getValue() { return *this; } - const DataType &getValue() const { return *this; } -}; - -// Define a partial specialization to handle things we cannot inherit from. In -// this case, we store an instance through containment, and overload operators -// to get at the value. -// -template -struct opt_storage { - DataType Value; - - // Make sure we initialize the value with the default constructor for the - // type. - opt_storage() : Value(DataType()) {} - - template - void setValue(const T &V) { Value = V; } - DataType &getValue() { return Value; } - DataType getValue() const { return Value; } - - // If the datatype is a pointer, support -> on it. - DataType operator->() const { return Value; } -}; - - -//===----------------------------------------------------------------------===// -// opt - A scalar command line option. -// -template > -class opt : public Option, - public opt_storage::value> { - ParserClass Parser; - - virtual bool handleOccurrence(unsigned pos, const char *ArgName, - const std::string &Arg) { - typename ParserClass::parser_data_type Val; - if (Parser.parse(*this, ArgName, Arg, Val)) - return true; // Parse error! - setValue(Val); - setPosition(pos); - return false; - } - - virtual enum ValueExpected getValueExpectedFlagDefault() const { - return Parser.getValueExpectedFlagDefault(); - } - - // Forward printing stuff to the parser... - virtual unsigned getOptionWidth() const {return Parser.getOptionWidth(*this);} - virtual void printOptionInfo(unsigned GlobalWidth) const { - Parser.printOptionInfo(*this, GlobalWidth); - } - - void done() { - addArgument(ArgStr); - Parser.initialize(*this); - } -public: - // setInitialValue - Used by the cl::init modifier... - void setInitialValue(const DataType &V) { this->setValue(V); } - - ParserClass &getParser() { return Parser; } - - operator DataType() const { return this->getValue(); } - - template - DataType &operator=(const T &Val) { - this->setValue(Val); - return this->getValue(); - } - - // One option... - template - opt(const M0t &M0) { - apply(M0, this); - done(); - } - - // Two options... - template - opt(const M0t &M0, const M1t &M1) { - apply(M0, this); apply(M1, this); - done(); - } - - // Three options... - template - opt(const M0t &M0, const M1t &M1, const M2t &M2) { - apply(M0, this); apply(M1, this); apply(M2, this); - done(); - } - // Four options... - template - opt(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3) { - apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); - done(); - } - // Five options... - template - opt(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, - const M4t &M4) { - apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); - apply(M4, this); - done(); - } - // Six options... - template - opt(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, - const M4t &M4, const M5t &M5) { - apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); - apply(M4, this); apply(M5, this); - done(); - } - // Seven options... - template - opt(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, - const M4t &M4, const M5t &M5, const M6t &M6) { - apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); - apply(M4, this); apply(M5, this); apply(M6, this); - done(); - } - // Eight options... - template - opt(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, - const M4t &M4, const M5t &M5, const M6t &M6, const M7t &M7) { - apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); - apply(M4, this); apply(M5, this); apply(M6, this); apply(M7, this); - done(); - } -}; - -//===----------------------------------------------------------------------===// -// list_storage class - -// Default storage class definition: external storage. This implementation -// assumes the user will specify a variable to store the data into with the -// cl::location(x) modifier. -// -template -class list_storage { - StorageClass *Location; // Where to store the object... - -public: - list_storage() : Location(0) {} - - bool setLocation(Option &O, StorageClass &L) { - if (Location) - return O.error(": cl::location(x) specified more than once!"); - Location = &L; - return false; - } - - template - void addValue(const T &V) { - assert(Location != 0 && "cl::location(...) not specified for a command " - "line option with external storage!"); - Location->push_back(V); - } -}; - - -// Define how to hold a class type object, such as a string. Since we can -// inherit from a class, we do so. This makes us exactly compatible with the -// object in all cases that it is used. -// -template -struct list_storage : public std::vector { - - template - void addValue(const T &V) { push_back(V); } -}; - - -//===----------------------------------------------------------------------===// -// list - A list of command line options. -// -template > -class list : public Option, public list_storage { - std::vector Positions; - ParserClass Parser; - - virtual enum NumOccurrences getNumOccurrencesFlagDefault() const { - return ZeroOrMore; - } - virtual enum ValueExpected getValueExpectedFlagDefault() const { - return Parser.getValueExpectedFlagDefault(); - } - - virtual bool handleOccurrence(unsigned pos, const char *ArgName, - const std::string &Arg) { - typename ParserClass::parser_data_type Val; - if (Parser.parse(*this, ArgName, Arg, Val)) - return true; // Parse Error! - addValue(Val); - setPosition(pos); - Positions.push_back(pos); - return false; - } - - // Forward printing stuff to the parser... - virtual unsigned getOptionWidth() const {return Parser.getOptionWidth(*this);} - virtual void printOptionInfo(unsigned GlobalWidth) const { - Parser.printOptionInfo(*this, GlobalWidth); - } - - void done() { - addArgument(ArgStr); - Parser.initialize(*this); - } -public: - ParserClass &getParser() { return Parser; } - - unsigned getPosition(unsigned optnum) { - assert(optnum < this->size() && "Invalid option index"); - return Positions[optnum]; - } - - // One option... - template - list(const M0t &M0) { - apply(M0, this); - done(); - } - // Two options... - template - list(const M0t &M0, const M1t &M1) { - apply(M0, this); apply(M1, this); - done(); - } - // Three options... - template - list(const M0t &M0, const M1t &M1, const M2t &M2) { - apply(M0, this); apply(M1, this); apply(M2, this); - done(); - } - // Four options... - template - list(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3) { - apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); - done(); - } - // Five options... - template - list(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, - const M4t &M4) { - apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); - apply(M4, this); - done(); - } - // Six options... - template - list(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, - const M4t &M4, const M5t &M5) { - apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); - apply(M4, this); apply(M5, this); - done(); - } - // Seven options... - template - list(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, - const M4t &M4, const M5t &M5, const M6t &M6) { - apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); - apply(M4, this); apply(M5, this); apply(M6, this); - done(); - } - // Eight options... - template - list(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3, - const M4t &M4, const M5t &M5, const M6t &M6, const M7t &M7) { - apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); - apply(M4, this); apply(M5, this); apply(M6, this); apply(M7, this); - done(); - } -}; - -//===----------------------------------------------------------------------===// -// Aliased command line option (alias this name to a preexisting name) -// - -class alias : public Option { - Option *AliasFor; - virtual bool handleOccurrence(unsigned pos, const char *ArgName, - const std::string &Arg) { - return AliasFor->handleOccurrence(pos, AliasFor->ArgStr, Arg); - } - // Aliases default to be hidden... - virtual enum OptionHidden getOptionHiddenFlagDefault() const {return Hidden;} - - // Handle printing stuff... - virtual unsigned getOptionWidth() const; - virtual void printOptionInfo(unsigned GlobalWidth) const; - - void done() { - if (!hasArgStr()) - error(": cl::alias must have argument name specified!"); - if (AliasFor == 0) - error(": cl::alias must have an cl::aliasopt(option) specified!"); - addArgument(ArgStr); - } -public: - void setAliasFor(Option &O) { - if (AliasFor) - error(": cl::alias must only have one cl::aliasopt(...) specified!"); - AliasFor = &O; - } - - // One option... - template - alias(const M0t &M0) : AliasFor(0) { - apply(M0, this); - done(); - } - // Two options... - template - alias(const M0t &M0, const M1t &M1) : AliasFor(0) { - apply(M0, this); apply(M1, this); - done(); - } - // Three options... - template - alias(const M0t &M0, const M1t &M1, const M2t &M2) : AliasFor(0) { - apply(M0, this); apply(M1, this); apply(M2, this); - done(); - } - // Four options... - template - alias(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3) - : AliasFor(0) { - apply(M0, this); apply(M1, this); apply(M2, this); apply(M3, this); - done(); - } -}; - -// aliasfor - Modifier to set the option an alias aliases. -struct aliasopt { - Option &Opt; - aliasopt(Option &O) : Opt(O) {} - void apply(alias &A) const { A.setAliasFor(Opt); } -}; - -} // End namespace cl - -} // End namespace llvm - -#endif diff --git a/include/Support/DOTGraphTraits.h b/include/Support/DOTGraphTraits.h deleted file mode 100644 index 7dbc4ff0b65..00000000000 --- a/include/Support/DOTGraphTraits.h +++ /dev/null @@ -1,102 +0,0 @@ -//===-- Support/DotGraphTraits.h - Customize .dot output --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines a template class that can be used to customize dot output -// graphs generated by the GraphWriter.h file. The default implementation of -// this file will produce a simple, but not very polished graph. By -// specializing this template, lots of customization opportunities are possible. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_DOTGRAPHTRAITS_H -#define SUPPORT_DOTGRAPHTRAITS_H - -#include - -namespace llvm { - -/// DefaultDOTGraphTraits - This class provides the default implementations of -/// all of the DOTGraphTraits methods. If a specialization does not need to -/// override all methods here it should inherit so that it can get the default -/// implementations. -/// -struct DefaultDOTGraphTraits { - /// getGraphName - Return the label for the graph as a whole. Printed at the - /// top of the graph. - /// - static std::string getGraphName(const void *Graph) { return ""; } - - /// getGraphProperties - Return any custom properties that should be included - /// in the top level graph structure for dot. - /// - static std::string getGraphProperties(const void *Graph) { - return ""; - } - - /// getNodeLabel - Given a node and a pointer to the top level graph, return - /// the label to print in the node. - static std::string getNodeLabel(const void *Node, const void *Graph) { - return ""; - } - - /// If you want to specify custom node attributes, this is the place to do so - /// - static std::string getNodeAttributes(const void *Node) { return ""; } - - /// If you want to override the dot attributes printed for a particular edge, - /// override this method. - template - static std::string getEdgeAttributes(const void *Node, EdgeIter EI) { - return ""; - } - - /// getEdgeSourceLabel - If you want to label the edge source itself, - /// implement this method. - template - static std::string getEdgeSourceLabel(const void *Node, EdgeIter I) { - return ""; - } - - /// edgeTargetsEdgeSource - This method returns true if this outgoing edge - /// should actually target another edge source, not a node. If this method is - /// implemented, getEdgeTarget should be implemented. - template - static bool edgeTargetsEdgeSource(const void *Node, EdgeIter I) { - return false; - } - - /// getEdgeTarget - If edgeTargetsEdgeSource returns true, this method is - /// called to determine which outgoing edge of Node is the target of this - /// edge. - template - static EdgeIter getEdgeTarget(const void *Node, EdgeIter I) { - return I; - } - - /// addCustomGraphFeatures - If a graph is made up of more than just - /// straight-forward nodes and edges, this is the place to put all of the - /// custom stuff necessary. The GraphWriter object, instantiated with your - /// GraphType is passed in as an argument. You may call arbitrary methods on - /// it to add things to the output graph. - /// - template - static void addCustomGraphFeatures(const void *Graph, GraphWriter &GW) {} -}; - - -/// DOTGraphTraits - Template class that can be specialized to customize how -/// graphs are converted to 'dot' graphs. When specializing, you may inherit -/// from DefaultDOTGraphTraits if you don't need to override everything. -/// -template -class DOTGraphTraits : public DefaultDOTGraphTraits {}; - -} // End llvm namespace - -#endif diff --git a/include/Support/DataTypes.h.in b/include/Support/DataTypes.h.in deleted file mode 100644 index 180258478d3..00000000000 --- a/include/Support/DataTypes.h.in +++ /dev/null @@ -1,64 +0,0 @@ -//===-- include/Support/DataTypes.h - Define fixed size types ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains definitions to figure out the size of _HOST_ data types. -// This file is important because different host OS's define different macros, -// which makes portability tough. This file exports the following definitions: -// -// [u]int(32|64)_t : typedefs for signed and unsigned 32/64 bit system types -// [U]INT(8|16|32|64)_(MIN|MAX) : Constants for the min and max values. -// -// No library is required when using these functinons. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_DATATYPES_H -#define SUPPORT_DATATYPES_H - -// Note that this header's correct operation depends on __STDC_LIMIT_MACROS -// being defined. We would define it here, but in order to prevent Bad Things -// happening when system headers or C++ STL headers include stdint.h before -// we define it here, we define it on the g++ command line (in Makefile.rules). -#if !defined(__STDC_LIMIT_MACROS) -# error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h" -#endif - -#ifndef _MSC_VER -// Note that includes , if this is a C99 system. -@INCLUDE_INTTYPES_H@ -@INCLUDE_SYS_TYPES_H@ -@INCLUDE_STDINT_H@ -#else -// Visual C++ doesn't provide standard integer headers, but it does provide -// built-in data types. -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -typedef signed int int32_t; -typedef unsigned int uint32_t; -typedef signed int ssize_t; -#define INT8_MAX 127 -#define INT8_MIN -128 -#define UINT8_MAX 255 -#define INT16_MAX 32767 -#define INT16_MIN -32768 -#define UINT16_MAX 65535 -#define INT32_MAX 2147483647 -#define INT32_MIN -2147483648 -#define UINT32_MAX 4294967295U -#endif - -#if !defined(INT64_MAX) -/* We couldn't determine INT64_MAX; default it. */ -# define INT64_MAX 9223372036854775807LL -#endif -#if !defined(UINT64_MAX) -# define UINT64_MAX 0xffffffffffffffffULL -#endif - -#endif /* SUPPORT_DATATYPES_H */ diff --git a/include/Support/Debug.h b/include/Support/Debug.h deleted file mode 100644 index f0a1b3dc5bd..00000000000 --- a/include/Support/Debug.h +++ /dev/null @@ -1,67 +0,0 @@ -//===- Debug.h - An easy way to add debug output to your code ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements a handle way of adding debugging information to your -// code, without it being enabled all of the time, and without having to add -// command line options to enable it. -// -// In particular, just wrap your code with the DEBUG() macro, and it will be -// enabled automatically if you specify '-debug' on the command-line. -// Alternatively, you can also use the SET_DEBUG_TYPE("foo") macro to specify -// that your debug code belongs to class "foo". Then, on the command line, you -// can specify '-debug-only=foo' to enable JUST the debug information for the -// foo class. -// -// When compiling in release mode, the -debug-* options and all code in DEBUG() -// statements disappears, so it does not effect the runtime of the code. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_DEBUG_H -#define SUPPORT_DEBUG_H - -// Unsurprisingly, most users of this macro use std::cerr too. -#include - -namespace llvm { - -// DebugFlag - This boolean is set to true if the '-debug' command line option -// is specified. This should probably not be referenced directly, instead, use -// the DEBUG macro below. -// -extern bool DebugFlag; - -// isCurrentDebugType - Return true if the specified string is the debug type -// specified on the command line, or if none was specified on the command line -// with the -debug-only=X option. -// -bool isCurrentDebugType(const char *Type); - -// DEBUG macro - This macro should be used by passes to emit debug information. -// In the '-debug' option is specified on the commandline, and if this is a -// debug build, then the code specified as the option to the macro will be -// executed. Otherwise it will not be. Example: -// -// DEBUG(cerr << "Bitset contains: " << Bitset << "\n"); -// - -#ifndef DEBUG_TYPE -#define DEBUG_TYPE "" -#endif - -#ifdef NDEBUG -#define DEBUG(X) -#else -#define DEBUG(X) \ - do { if (DebugFlag && isCurrentDebugType(DEBUG_TYPE)) { X; } } while (0) -#endif - -} // End llvm namespace - -#endif diff --git a/include/Support/DenseMap.h b/include/Support/DenseMap.h deleted file mode 100644 index 4f6dc91bb63..00000000000 --- a/include/Support/DenseMap.h +++ /dev/null @@ -1,73 +0,0 @@ -//===- DenseMap.h - A dense map implmentation -------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements a dense map. A dense map template takes two -// types. The first is the mapped type and the second is a functor -// that maps its argument to a size_t. On instantiation a "null" value -// can be provided to be used as a "does not exist" indicator in the -// map. A member function grow() is provided that given the value of -// the maximally indexed key (the argument of the functor) makes sure -// the map has enough space for it. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_DENSEMAP_H -#define SUPPORT_DENSEMAP_H - -#include - -namespace llvm { - - struct IdentityFunctor : std::unary_function { - unsigned operator()(unsigned Index) const { - return Index; - } - }; - - template - class DenseMap { - typedef typename ToIndexT::argument_type IndexT; - typedef std::vector StorageT; - StorageT storage_; - T nullVal_; - ToIndexT toIndex_; - - public: - DenseMap() : nullVal_(T()) { } - - explicit DenseMap(const T& val) : nullVal_(val) { } - - typename StorageT::reference operator[](IndexT n) { - assert(toIndex_(n) < storage_.size() && "index out of bounds!"); - return storage_[toIndex_(n)]; - } - - typename StorageT::const_reference operator[](IndexT n) const { - assert(toIndex_(n) < storage_.size() && "index out of bounds!"); - return storage_[toIndex_(n)]; - } - - void clear() { - storage_.clear(); - } - - void grow(IndexT n) { - unsigned NewSize = toIndex_(n) + 1; - if (NewSize > storage_.size()) - storage_.resize(NewSize, nullVal_); - } - - typename StorageT::size_type size() const { - return storage_.size(); - } - }; - -} // End llvm namespace - -#endif diff --git a/include/Support/DepthFirstIterator.h b/include/Support/DepthFirstIterator.h deleted file mode 100644 index c465f4e549e..00000000000 --- a/include/Support/DepthFirstIterator.h +++ /dev/null @@ -1,230 +0,0 @@ -//===- Support/DepthFirstIterator.h - Depth First iterator ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file builds on the Support/GraphTraits.h file to build generic depth -// first graph iterator. This file exposes the following functions/types: -// -// df_begin/df_end/df_iterator -// * Normal depth-first iteration - visit a node and then all of its children. -// -// idf_begin/idf_end/idf_iterator -// * Depth-first iteration on the 'inverse' graph. -// -// df_ext_begin/df_ext_end/df_ext_iterator -// * Normal depth-first iteration - visit a node and then all of its children. -// This iterator stores the 'visited' set in an external set, which allows -// it to be more efficient, and allows external clients to use the set for -// other purposes. -// -// idf_ext_begin/idf_ext_end/idf_ext_iterator -// * Depth-first iteration on the 'inverse' graph. -// This iterator stores the 'visited' set in an external set, which allows -// it to be more efficient, and allows external clients to use the set for -// other purposes. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_DEPTHFIRSTITERATOR_H -#define SUPPORT_DEPTHFIRSTITERATOR_H - -#include "Support/GraphTraits.h" -#include "Support/iterator" -#include -#include - -namespace llvm { - -// df_iterator_storage - A private class which is used to figure out where to -// store the visited set. -template // Non-external set -class df_iterator_storage { -public: - SetType Visited; -}; - -template -class df_iterator_storage { -public: - df_iterator_storage(SetType &VSet) : Visited(VSet) {} - df_iterator_storage(const df_iterator_storage &S) : Visited(S.Visited) {} - SetType &Visited; -}; - - -// Generic Depth First Iterator -template::NodeType*>, - bool ExtStorage = false, class GT = GraphTraits > -class df_iterator : public forward_iterator, - public df_iterator_storage { - typedef forward_iterator super; - - typedef typename GT::NodeType NodeType; - typedef typename GT::ChildIteratorType ChildItTy; - - // VisitStack - Used to maintain the ordering. Top = current block - // First element is node pointer, second is the 'next child' to visit - std::vector > VisitStack; -private: - inline df_iterator(NodeType *Node) { - this->Visited.insert(Node); - VisitStack.push_back(std::make_pair(Node, GT::child_begin(Node))); - } - inline df_iterator() { /* End is when stack is empty */ } - - inline df_iterator(NodeType *Node, SetType &S) - : df_iterator_storage(S) { - if (!S.count(Node)) { - this->Visited.insert(Node); - VisitStack.push_back(std::make_pair(Node, GT::child_begin(Node))); - } - } - inline df_iterator(SetType &S) - : df_iterator_storage(S) { - // End is when stack is empty - } - -public: - typedef typename super::pointer pointer; - typedef df_iterator _Self; - - // Provide static begin and end methods as our public "constructors" - static inline _Self begin(GraphT G) { - return _Self(GT::getEntryNode(G)); - } - static inline _Self end(GraphT G) { return _Self(); } - - // Static begin and end methods as our public ctors for external iterators - static inline _Self begin(GraphT G, SetType &S) { - return _Self(GT::getEntryNode(G), S); - } - static inline _Self end(GraphT G, SetType &S) { return _Self(S); } - - inline bool operator==(const _Self& x) const { - return VisitStack.size() == x.VisitStack.size() && - VisitStack == x.VisitStack; - } - inline bool operator!=(const _Self& x) const { return !operator==(x); } - - inline pointer operator*() const { - return VisitStack.back().first; - } - - // This is a nonstandard operator-> that dereferences the pointer an extra - // time... so that you can actually call methods ON the Node, because - // the contained type is a pointer. This allows BBIt->getTerminator() f.e. - // - inline NodeType *operator->() const { return operator*(); } - - inline _Self& operator++() { // Preincrement - do { - std::pair &Top = VisitStack.back(); - NodeType *Node = Top.first; - ChildItTy &It = Top.second; - - while (It != GT::child_end(Node)) { - NodeType *Next = *It++; - if (!this->Visited.count(Next)) { // Has our next sibling been visited? - // No, do it now. - this->Visited.insert(Next); - VisitStack.push_back(std::make_pair(Next, GT::child_begin(Next))); - return *this; - } - } - - // Oops, ran out of successors... go up a level on the stack. - VisitStack.pop_back(); - } while (!VisitStack.empty()); - return *this; - } - - inline _Self operator++(int) { // Postincrement - _Self tmp = *this; ++*this; return tmp; - } - - // nodeVisited - return true if this iterator has already visited the - // specified node. This is public, and will probably be used to iterate over - // nodes that a depth first iteration did not find: ie unreachable nodes. - // - inline bool nodeVisited(NodeType *Node) const { - return this->Visited.count(Node) != 0; - } -}; - - -// Provide global constructors that automatically figure out correct types... -// -template -df_iterator df_begin(T G) { - return df_iterator::begin(G); -} - -template -df_iterator df_end(T G) { - return df_iterator::end(G); -} - -// Provide global definitions of external depth first iterators... -template ::NodeType*> > -struct df_ext_iterator : public df_iterator { - df_ext_iterator(const df_iterator &V) - : df_iterator(V) {} -}; - -template -df_ext_iterator df_ext_begin(T G, SetTy &S) { - return df_ext_iterator::begin(G, S); -} - -template -df_ext_iterator df_ext_end(T G, SetTy &S) { - return df_ext_iterator::end(G, S); -} - - -// Provide global definitions of inverse depth first iterators... -template ::NodeType*>, - bool External = false> -struct idf_iterator : public df_iterator, SetTy, External> { - idf_iterator(const df_iterator, SetTy, External> &V) - : df_iterator, SetTy, External>(V) {} -}; - -template -idf_iterator idf_begin(T G) { - return idf_iterator::begin(G); -} - -template -idf_iterator idf_end(T G){ - return idf_iterator::end(G); -} - -// Provide global definitions of external inverse depth first iterators... -template ::NodeType*> > -struct idf_ext_iterator : public idf_iterator { - idf_ext_iterator(const idf_iterator &V) - : idf_iterator(V) {} - idf_ext_iterator(const df_iterator, SetTy, true> &V) - : idf_iterator(V) {} -}; - -template -idf_ext_iterator idf_ext_begin(T G, SetTy &S) { - return idf_ext_iterator::begin(G, S); -} - -template -idf_ext_iterator idf_ext_end(T G, SetTy &S) { - return idf_ext_iterator::end(G, S); -} - -} // End llvm namespace - -#endif diff --git a/include/Support/DynamicLinker.h b/include/Support/DynamicLinker.h deleted file mode 100644 index fec9a45296c..00000000000 --- a/include/Support/DynamicLinker.h +++ /dev/null @@ -1,40 +0,0 @@ -//===-- DynamicLinker.h - System-indep. DynamicLinker interface -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Lightweight interface to dynamic library linking and loading, and dynamic -// symbol lookup functionality, in whatever form the operating system -// provides it. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_DYNAMICLINKER_H -#define SUPPORT_DYNAMICLINKER_H - -#include - -namespace llvm { - -/// LinkDynamicObject - Load the named file as a dynamic library -/// and link it with the currently running process. Returns false -/// on success, true if there is an error (and sets ErrorMessage -/// if it is not NULL). Analogous to dlopen(). -/// -bool LinkDynamicObject (const char *filename, std::string *ErrorMessage); - -/// GetAddressOfSymbol - Returns the address of the named symbol in -/// the currently running process, as reported by the dynamic linker, -/// or NULL if the symbol does not exist or some other error has -/// occurred. -/// -void *GetAddressOfSymbol (const char *symbolName); -void *GetAddressOfSymbol (const std::string &symbolName); - -} // End llvm namespace - -#endif // SUPPORT_DYNAMICLINKER_H diff --git a/include/Support/ELF.h b/include/Support/ELF.h deleted file mode 100644 index e4b87b90222..00000000000 --- a/include/Support/ELF.h +++ /dev/null @@ -1,295 +0,0 @@ -//===-- Support/ELF.h - ELF constants and data structures -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This header contains common, non-processor-specific data structures and -// constants for the ELF file format. -// -// The details of the ELF32 bits in this file are largely based on -// the Tool Interface Standard (TIS) Executable and Linking Format -// (ELF) Specification Version 1.2, May 1995. The ELF64 stuff is not -// standardized, as far as I can tell. It was largely based on information -// I found in OpenBSD header files. -// -//===----------------------------------------------------------------------===// - -#include "Support/DataTypes.h" -#include -#include - -namespace llvm { - -namespace ELF { - -typedef uint32_t Elf32_Addr; // Program address -typedef uint16_t Elf32_Half; -typedef uint32_t Elf32_Off; // File offset -typedef int32_t Elf32_Sword; -typedef uint32_t Elf32_Word; - -typedef uint64_t Elf64_Addr; -typedef uint64_t Elf64_Off; -typedef int32_t Elf64_Shalf; -typedef int32_t Elf64_Sword; -typedef uint32_t Elf64_Word; -typedef int64_t Elf64_Sxword; -typedef uint64_t Elf64_Xword; -typedef uint32_t Elf64_Half; -typedef uint16_t Elf64_Quarter; - -// Object file magic string. -static const char ElfMagic[] = { 0x7f, 'E', 'L', 'F', '\0' }; - -struct Elf32_Ehdr { - unsigned char e_ident[16]; // ELF Identification bytes - Elf32_Half e_type; // Type of file (see ET_* below) - Elf32_Half e_machine; // Required architecture for this file (see EM_*) - Elf32_Word e_version; // Must be equal to 1 - Elf32_Addr e_entry; // Address to jump to in order to start program - Elf32_Off e_phoff; // Program header table's file offset, in bytes - Elf32_Off e_shoff; // Section header table's file offset, in bytes - Elf32_Word e_flags; // Processor-specific flags - Elf32_Half e_ehsize; // Size of ELF header, in bytes - Elf32_Half e_phentsize; // Size of an entry in the program header table - Elf32_Half e_phnum; // Number of entries in the program header table - Elf32_Half e_shentsize; // Size of an entry in the section header table - Elf32_Half e_shnum; // Number of entries in the section header table - Elf32_Half e_shstrndx; // Sect hdr table index of sect name string table - bool checkMagic () const { - return (memcmp (e_ident, ElfMagic, strlen (ElfMagic))) == 0; - } - unsigned char getFileClass () const { return e_ident[4]; } - unsigned char getDataEncoding () { return e_ident[5]; } -}; - -// 64-bit ELF header. Fields are the same as for ELF32, but with different -// types (see above). -struct Elf64_Ehdr { - unsigned char e_ident[16]; - Elf64_Quarter e_type; - Elf64_Quarter e_machine; - Elf64_Half e_version; - Elf64_Addr e_entry; - Elf64_Off e_phoff; - Elf64_Off e_shoff; - Elf64_Half e_flags; - Elf64_Quarter e_ehsize; - Elf64_Quarter e_phentsize; - Elf64_Quarter e_phnum; - Elf64_Quarter e_shentsize; - Elf64_Quarter e_shnum; - Elf64_Quarter e_shstrndx; -}; - -// File types -enum { - ET_NONE = 0, // No file type - ET_REL = 1, // Relocatable file - ET_EXEC = 2, // Executable file - ET_DYN = 3, // Shared object file - ET_CORE = 4, // Core file - ET_LOPROC = 0xff00, // Beginning of processor-specific codes - ET_HIPROC = 0xffff // Processor-specific -}; - -// Machine architectures -enum { - EM_NONE = 0, // No machine - EM_M32 = 1, // AT&T WE 32100 - EM_SPARC = 2, // SPARC - EM_386 = 3, // Intel 386 - EM_68K = 4, // Motorola 68000 - EM_88K = 5, // Motorola 88000 - EM_486 = 6, // Intel 486 (deprecated) - EM_860 = 7, // Intel 80860 - EM_MIPS = 8, // MIPS R3000 - EM_PPC = 20, // PowerPC - EM_ARM = 40, // ARM - EM_ALPHA = 41, // DEC Alpha - EM_SPARCV9 = 43 // SPARC V9 -}; - -// Object file classes. -enum { - ELFCLASS32 = 1, // 32-bit object file - ELFCLASS64 = 2 // 64-bit object file -}; - -// Object file byte orderings. -enum { - ELFDATA2LSB = 1, // Little-endian object file - ELFDATA2MSB = 2 // Big-endian object file -}; - -// Section header. -struct Elf32_Shdr { - Elf32_Word sh_name; // Section name (index into string table) - Elf32_Word sh_type; // Section type (SHT_*) - Elf32_Word sh_flags; // Section flags (SHF_*) - Elf32_Addr sh_addr; // Address where section is to be loaded - Elf32_Off sh_offset; // File offset of section data, in bytes - Elf32_Word sh_size; // Size of section, in bytes - Elf32_Word sh_link; // Section type-specific header table index link - Elf32_Word sh_info; // Section type-specific extra information - Elf32_Word sh_addralign; // Section address alignment - Elf32_Word sh_entsize; // Size of records contained within the section -}; - -// Section header for ELF64 - same fields as ELF32, different types. -struct Elf64_Shdr { - Elf64_Half sh_name; - Elf64_Half sh_type; - Elf64_Xword sh_flags; - Elf64_Addr sh_addr; - Elf64_Off sh_offset; - Elf64_Xword sh_size; - Elf64_Half sh_link; - Elf64_Half sh_info; - Elf64_Xword sh_addralign; - Elf64_Xword sh_entsize; -}; - -// Special section indices. -enum { - SHN_UNDEF = 0, // Undefined, missing, irrelevant, or meaningless - SHN_LORESERVE = 0xff00, // Lowest reserved index - SHN_LOPROC = 0xff00, // Lowest processor-specific index - SHN_HIPROC = 0xff1f, // Highest processor-specific index - SHN_ABS = 0xfff1, // Symbol has absolute value; does not need relocation - SHN_COMMON = 0xfff2, // FORTRAN COMMON or C external global variables - SHN_HIRESERVE = 0xffff // Highest reserved index -}; - -// Section types. -enum { - SHT_NULL = 0, // No associated section (inactive entry). - SHT_PROGBITS = 1, // Program-defined contents. - SHT_SYMTAB = 2, // Symbol table. - SHT_STRTAB = 3, // String table. - SHT_RELA = 4, // Relocation entries; explicit addends. - SHT_HASH = 5, // Symbol hash table. - SHT_DYNAMIC = 6, // Information for dynamic linking. - SHT_NOTE = 7, // Information about the file. - SHT_NOBITS = 8, // Data occupies no space in the file. - SHT_REL = 9, // Relocation entries; no explicit addends. - SHT_SHLIB = 10, // Reserved. - SHT_DYNSYM = 11, // Symbol table. - SHT_LOPROC = 0x70000000, // Lowest processor architecture-specific type. - SHT_HIPROC = 0x7fffffff, // Highest processor architecture-specific type. - SHT_LOUSER = 0x80000000, // Lowest type reserved for applications. - SHT_HIUSER = 0xffffffff // Highest type reserved for applications. -}; - -// Section flags. -enum { - SHF_WRITE = 0x1, // Section data should be writable during execution. - SHF_ALLOC = 0x2, // Section occupies memory during program execution. - SHF_EXECINSTR = 0x4, // Section contains executable machine instructions. - SHF_MASKPROC = 0xf0000000 // Bits indicating processor-specific flags. -}; - -// Symbol table entries. -struct Elf32_Sym { - Elf32_Word st_name; // Symbol name (index into string table) - Elf32_Addr st_value; // Value or address associated with the symbol - Elf32_Word st_size; // Size of the symbol - unsigned char st_info; // Symbol's type and binding attributes - unsigned char st_other; // Must be zero; reserved - Elf32_Half st_shndx; // Which section (header table index) it's defined in - - // These accessors and mutators correspond to the ELF32_ST_BIND, - // ELF32_ST_TYPE, and ELF32_ST_INFO macros defined in the ELF specification: - unsigned char getBinding () const { return st_info >> 4; } - unsigned char getType () const { return st_info & 0x0f; } - void setBinding (unsigned char b) { setBindingAndType (b, getType ()); } - void setType (unsigned char t) { setBindingAndType (getBinding (), t); } - void setBindingAndType (unsigned char b, unsigned char t) { - st_info = (b << 4) + (t & 0x0f); - } -}; - -// Symbol bindings. -enum { - STB_LOCAL = 0, // Local symbol, not visible outside obj file containing def - STB_GLOBAL = 1, // Global symbol, visible to all object files being combined - STB_WEAK = 2, // Weak symbol, like global but lower-precedence - STB_LOPROC = 13, // Lowest processor-specific binding type - STB_HIPROC = 15 // Highest processor-specific binding type -}; - -// Symbol types. -enum { - STT_NOTYPE = 0, // Symbol's type is not specified - STT_OBJECT = 1, // Symbol is a data object (variable, array, etc.) - STT_FUNC = 2, // Symbol is executable code (function, etc.) - STT_SECTION = 3, // Symbol refers to a section - STT_FILE = 4, // Local, absolute symbol that refers to a file - STT_LOPROC = 13, // Lowest processor-specific symbol type - STT_HIPROC = 15 // Highest processor-specific symbol type -}; - -// Relocation entry, without explicit addend. -struct Elf32_Rel { - Elf32_Addr r_offset; // Location (file byte offset, or program virtual addr) - Elf32_Word r_info; // Symbol table index and type of relocation to apply - - // These accessors and mutators correspond to the ELF32_R_SYM, ELF32_R_TYPE, - // and ELF32_R_INFO macros defined in the ELF specification: - Elf32_Word getSymbol () const { return (r_info >> 8); } - unsigned char getType () const { return (unsigned char) (r_info & 0x0ff); } - void setSymbol (Elf32_Word s) { setSymbolAndType (s, getType ()); } - void setType (unsigned char t) { setSymbolAndType (getSymbol(), t); } - void setSymbolAndType (Elf32_Word s, unsigned char t) { - r_info = (s << 8) + t; - }; -}; - -// Relocation entry with explicit addend. -struct Elf32_Rela { - Elf32_Addr r_offset; // Location (file byte offset, or program virtual addr) - Elf32_Word r_info; // Symbol table index and type of relocation to apply - Elf32_Sword r_addend; // Compute value for relocatable field by adding this - - // These accessors and mutators correspond to the ELF32_R_SYM, ELF32_R_TYPE, - // and ELF32_R_INFO macros defined in the ELF specification: - Elf32_Word getSymbol () const { return (r_info >> 8); } - unsigned char getType () const { return (unsigned char) (r_info & 0x0ff); } - void setSymbol (Elf32_Word s) { setSymbolAndType (s, getType ()); } - void setType (unsigned char t) { setSymbolAndType (getSymbol(), t); } - void setSymbolAndType (Elf32_Word s, unsigned char t) { - r_info = (s << 8) + t; - }; -}; - -// Program header. -struct Elf32_Phdr { - Elf32_Word p_type; // Type of segment - Elf32_Off p_offset; // File offset where segment is located, in bytes - Elf32_Addr p_vaddr; // Virtual address of beginning of segment - Elf32_Addr p_paddr; // Physical address of beginning of segment (OS-specific) - Elf32_Word p_filesz; // Num. of bytes in file image of segment (may be zero) - Elf32_Word p_memsz; // Num. of bytes in mem image of segment (may be zero) - Elf32_Word p_flags; // Segment flags - Elf32_Word p_align; // Segment alignment constraint -}; - -enum { - PT_NULL = 0, // Unused segment. - PT_LOAD = 1, // Loadable segment. - PT_DYNAMIC = 2, // Dynamic linking information. - PT_INTERP = 3, // Interpreter pathname. - PT_NOTE = 4, // Auxiliary information. - PT_SHLIB = 5, // Reserved. - PT_PHDR = 6, // The program header table itself. - PT_LOPROC = 0x70000000, // Lowest processor-specific program hdr entry type. - PT_HIPROC = 0x7fffffff // Highest processor-specific program hdr entry type. -}; - -} // end namespace ELF - -} // end namespace llvm diff --git a/include/Support/EquivalenceClasses.h b/include/Support/EquivalenceClasses.h deleted file mode 100644 index 127183614be..00000000000 --- a/include/Support/EquivalenceClasses.h +++ /dev/null @@ -1,116 +0,0 @@ -//===-- Support/EquivalenceClasses.h ----------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Generic implementation of equivalence classes and implementation of -// union-find algorithms A not-so-fancy implementation: 2 level tree i.e root -// and one more level Overhead of a union = size of the equivalence class being -// attached Overhead of a find = 1. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_EQUIVALENCECLASSES_H -#define SUPPORT_EQUIVALENCECLASSES_H - -#include -#include -#include - -namespace llvm { - -template -class EquivalenceClasses { - // Maps each element to the element that is the leader of its - // equivalence class. - std::map Elem2LeaderMap; - - // Maintains the set of leaders - std::set LeaderSet; - - // Caches the equivalence class for each leader - std::map > LeaderToEqClassMap; - - // Make Element2 the leader of the union of classes Element1 and Element2 - // Element1 and Element2 are presumed to be leaders of their respective - // equivalence classes. - void attach(ElemTy Element1, ElemTy Element2) { - for (typename std::map::iterator ElemI = - Elem2LeaderMap.begin(), ElemE = Elem2LeaderMap.end(); - ElemI != ElemE; ++ElemI) { - if (ElemI->second == Element1) - Elem2LeaderMap[ElemI->first] = Element2; - } - } - -public: - // If an element has not yet in any class, make it a separate new class. - // Return the leader of the class containing the element. - ElemTy addElement (ElemTy NewElement) { - typename std::map::iterator ElemI = - Elem2LeaderMap.find(NewElement); - if (ElemI == Elem2LeaderMap.end()) { - Elem2LeaderMap[NewElement] = NewElement; - LeaderSet.insert(NewElement); - return NewElement; - } - else - return ElemI->second; - } - - ElemTy findClass(ElemTy Element) const { - typename std::map::const_iterator I = - Elem2LeaderMap.find(Element); - return (I == Elem2LeaderMap.end())? (ElemTy) 0 : I->second; - } - - /// Attach the set with Element1 to the set with Element2 adding Element1 and - /// Element2 to the set of equivalence classes if they are not there already. - /// Implication: Make Element1 the element in the smaller set. - /// Take Leader[Element1] out of the set of leaders. - void unionSetsWith(ElemTy Element1, ElemTy Element2) { - // If either Element1 or Element2 does not already exist, include it - const ElemTy& leader1 = addElement(Element1); - const ElemTy& leader2 = addElement(Element2); - assert(leader1 != (ElemTy) 0 && leader2 != (ElemTy) 0); - if (leader1 != leader2) { - attach(leader1, leader2); - LeaderSet.erase(leader1); - } - } - - // Returns a vector containing all the elements in the equivalence class - // including Element1 - const std::set & getEqClass(ElemTy Element1) { - assert(Elem2LeaderMap.find(Element1) != Elem2LeaderMap.end()); - const ElemTy classLeader = Elem2LeaderMap[Element1]; - - std::set & EqClass = LeaderToEqClassMap[classLeader]; - - // If the EqClass vector is empty, it has not been computed yet: do it now - if (EqClass.empty()) { - for (typename std::map::iterator - ElemI = Elem2LeaderMap.begin(), ElemE = Elem2LeaderMap.end(); - ElemI != ElemE; ++ElemI) - if (ElemI->second == classLeader) - EqClass.insert(ElemI->first); - assert(! EqClass.empty()); // must at least include the leader - } - - return EqClass; - } - - std::set& getLeaderSet() { return LeaderSet; } - const std::set& getLeaderSet() const { return LeaderSet; } - - std::map& getLeaderMap() { return Elem2LeaderMap;} - const std::map& getLeaderMap() const { return Elem2LeaderMap;} -}; - -} // End llvm namespace - -#endif diff --git a/include/Support/FileUtilities.h b/include/Support/FileUtilities.h deleted file mode 100644 index 78983b8352c..00000000000 --- a/include/Support/FileUtilities.h +++ /dev/null @@ -1,170 +0,0 @@ -//===- Support/FileUtilities.h - File System Utilities ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines a family of utility functions which are useful for doing -// various things with files. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_FILEUTILITIES_H -#define SUPPORT_FILEUTILITIES_H - -#include - -namespace llvm { - -/// CheckMagic - Returns true IFF the file named FN begins with Magic. FN must -/// name a readable file. -/// -bool CheckMagic (const std::string &FN, const std::string &Magic); - -/// IsArchive - Returns true IFF the file named FN appears to be a "ar" library -/// archive. The file named FN must exist. -/// -bool IsArchive (const std::string &FN); - -/// IsBytecode - Returns true IFF the file named FN appears to be an LLVM -/// bytecode file. The file named FN must exist. -/// -bool IsBytecode (const std::string &FN); - -/// IsSharedObject - Returns trus IFF the file named FN appears to be a shared -/// object with an ELF header. The file named FN must exist. -/// -bool IsSharedObject(const std::string &FN); - -/// FileOpenable - Returns true IFF Filename names an existing regular file -/// which we can successfully open. -/// -bool FileOpenable(const std::string &Filename); - -/// DiffFiles - Compare the two files specified, returning true if they are -/// different or if there is a file error. If you specify a string to fill in -/// for the error option, it will set the string to an error message if an error -/// occurs, allowing the caller to distinguish between a failed diff and a file -/// system error. -/// -bool DiffFiles(const std::string &FileA, const std::string &FileB, - std::string *Error = 0); - -/// CopyFile - Copy the specified source file to the specified destination, -/// overwriting destination if it exists. This returns true on failure. -/// -bool CopyFile(const std::string &Dest, const std::string &Src); - -/// MoveFileOverIfUpdated - If the file specified by New is different than Old, -/// or if Old does not exist, move the New file over the Old file. Otherwise, -/// remove the New file. -/// -void MoveFileOverIfUpdated(const std::string &New, const std::string &Old); - -/// removeFile - Delete the specified file. -/// -void removeFile(const std::string &Filename); - -/// getUniqueFilename - Return a filename with the specified prefix. If the -/// file does not exist yet, return it, otherwise add a suffix to make it -/// unique. -/// -std::string getUniqueFilename(const std::string &FilenameBase); - -/// MakeFileExecutable - This method turns on whatever access attributes are -/// needed to make the specified file executable. It returns true on success. -/// In case of failure, the file's access attributes are unspecified. -/// -bool MakeFileExecutable(const std::string &Filename); - -/// MakeFileReadable - This method turns on whatever access attributes are -/// needed to make the specified file readable. It returns true on success. -/// In case of failure, the file's access attributes are unspecified. -/// -bool MakeFileReadable(const std::string &Filename); - -/// getFileSize - Return the size of the specified file in bytes, or -1 if the -/// file cannot be read or does not exist. -long long getFileSize(const std::string &Filename); - - -/// getFileTimestamp - Get the last modified time for the specified file in an -/// unspecified format. This is useful to allow checking to see if a file was -/// updated since that last time the timestampt was aquired. If the file does -/// not exist or there is an error getting the time-stamp, zero is returned. -unsigned long long getFileTimestamp(const std::string &Filename); - -/// ReadFileIntoAddressSpace - Attempt to map the specific file into the -/// address space of the current process for reading. If this succeeds, -/// return the address of the buffer and the length of the file mapped. On -/// failure, return null. -void *ReadFileIntoAddressSpace(const std::string &Filename, unsigned &Length); - -/// UnmapFileFromAddressSpace - Remove the specified file from the current -/// address space. -void UnmapFileFromAddressSpace(void *Buffer, unsigned Length); - - -/// FDHandle - Simple handle class to make sure a file descriptor gets closed -/// when the object is destroyed. This handle acts similarly to an -/// std::auto_ptr, in that the copy constructor and assignment operators -/// transfer ownership of the handle. This means that FDHandle's do not have -/// value semantics. -/// -class FDHandle { - int FD; -public: - FDHandle() : FD(-1) {} - FDHandle(int fd) : FD(fd) {} - FDHandle(FDHandle &RHS) : FD(RHS.FD) { - RHS.FD = -1; // Transfer ownership - } - - ~FDHandle() throw(); - - /// get - Get the current file descriptor, without releasing ownership of it. - int get() const { return FD; } - operator int() const { return FD; } - - FDHandle &operator=(int fd) throw(); - - FDHandle &operator=(FDHandle &RHS) { - int fd = RHS.FD; - RHS.FD = -1; // Transfer ownership - return operator=(fd); - } - - /// release - Take ownership of the file descriptor away from the FDHandle - /// object, so that the file is not closed when the FDHandle is destroyed. - int release() { - int Ret = FD; - FD = -1; - return Ret; - } -}; - - /// FileRemover - This class is a simple object meant to be stack allocated. - /// If an exception is thrown from a region, the object removes the filename - /// specified (if deleteIt is true). - /// - class FileRemover { - std::string Filename; - bool DeleteIt; - public: - FileRemover(const std::string &filename, bool deleteIt = true) - : Filename(filename), DeleteIt(deleteIt) {} - - ~FileRemover() { - if (DeleteIt) removeFile(Filename); - } - - /// releaseFile - Take ownership of the file away from the FileRemover so it - /// will not be removed when the object is destroyed. - void releaseFile() { DeleteIt = false; } - }; -} // End llvm namespace - -#endif diff --git a/include/Support/GraphTraits.h b/include/Support/GraphTraits.h deleted file mode 100644 index 4ff74176a7a..00000000000 --- a/include/Support/GraphTraits.h +++ /dev/null @@ -1,83 +0,0 @@ -//===-- Support/GraphTraits.h - Graph traits template -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the little GraphTraits template class that should be -// specialized by classes that want to be iteratable by generic graph iterators. -// -// This file also defines the marker class Inverse that is used to iterate over -// graphs in a graph defined, inverse ordering... -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_GRAPHTRAITS_H -#define SUPPORT_GRAPHTRAITS_H - -namespace llvm { - -// GraphTraits - This class should be specialized by different graph types... -// which is why the default version is empty. -// -template -struct GraphTraits { - // Elements to provide: - - // typedef NodeType - Type of Node in the graph - // typedef ChildIteratorType - Type used to iterate over children in graph - - // static NodeType *getEntryNode(GraphType *) - // Return the entry node of the graph - - // static ChildIteratorType child_begin(NodeType *) - // static ChildIteratorType child_end (NodeType *) - // Return iterators that point to the beginning and ending of the child - // node list for the specified node. - // - - - // typedef ...iterator nodes_iterator; - // static nodes_iterator nodes_begin(GraphType *G) - // static nodes_iterator nodes_end (GraphType *G) - // - // nodes_iterator/begin/end - Allow iteration over all nodes in the graph - - - // If anyone tries to use this class without having an appropriate - // specialization, make an error. If you get this error, it's because you - // need to include the appropriate specialization of GraphTraits<> for your - // graph, or you need to define it for a new graph type. Either that or - // your argument to XXX_begin(...) is unknown or needs to have the proper .h - // file #include'd. - // - typedef typename GraphType::UnknownGraphTypeError NodeType; -}; - - -// Inverse - This class is used as a little marker class to tell the graph -// iterator to iterate over the graph in a graph defined "Inverse" ordering. -// Not all graphs define an inverse ordering, and if they do, it depends on -// the graph exactly what that is. Here's an example of usage with the -// df_iterator: -// -// idf_iterator I = idf_begin(M), E = idf_end(M); -// for (; I != E; ++I) { ... } -// -// Which is equivalent to: -// df_iterator > I = idf_begin(M), E = idf_end(M); -// for (; I != E; ++I) { ... } -// -template -struct Inverse { - GraphType &Graph; - - inline Inverse(GraphType &G) : Graph(G) {} -}; - -} // End llvm namespace - -#endif diff --git a/include/Support/GraphWriter.h b/include/Support/GraphWriter.h deleted file mode 100644 index c6a5c3cdc94..00000000000 --- a/include/Support/GraphWriter.h +++ /dev/null @@ -1,216 +0,0 @@ -//===-- Support/GraphWriter.h - Write a graph to a .dot file ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines a simple interface that can be used to print out generic -// LLVM graphs to ".dot" files. "dot" is a tool that is part of the AT&T -// graphviz package (http://www.research.att.com/sw/tools/graphviz/) which can -// be used to turn the files output by this interface into a variety of -// different graphics formats. -// -// Graphs do not need to implement any interface past what is already required -// by the GraphTraits template, but they can choose to implement specializations -// of the DOTGraphTraits template if they want to customize the graphs output in -// any way. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_GRAPHWRITER_H -#define SUPPORT_GRAPHWRITER_H - -#include "Support/DOTGraphTraits.h" -#include "Support/GraphTraits.h" -#include -#include - -namespace llvm { - -namespace DOT { // Private functions... - inline std::string EscapeString(const std::string &Label) { - std::string Str(Label); - for (unsigned i = 0; i != Str.length(); ++i) - switch (Str[i]) { - case '\n': - Str.insert(Str.begin()+i, '\\'); // Escape character... - ++i; - Str[i] = 'n'; - break; - case '\t': - Str.insert(Str.begin()+i, ' '); // Convert to two spaces - ++i; - Str[i] = ' '; - break; - case '\\': - if (i+1 != Str.length() && Str[i+1] == 'l') - break; // don't disturb \l - case '{': case '}': - case '<': case '>': - case '"': - Str.insert(Str.begin()+i, '\\'); // Escape character... - ++i; // don't infinite loop - break; - } - return Str; - } -} - -template -class GraphWriter { - std::ostream &O; - const GraphType &G; - - typedef DOTGraphTraits DOTTraits; - typedef GraphTraits GTraits; - typedef typename GTraits::NodeType NodeType; - typedef typename GTraits::nodes_iterator node_iterator; - typedef typename GTraits::ChildIteratorType child_iterator; -public: - GraphWriter(std::ostream &o, const GraphType &g) : O(o), G(g) {} - - void writeHeader(const std::string &Name) { - if (Name.empty()) - O << "digraph foo {\n"; // Graph name doesn't matter - else - O << "digraph " << Name << " {\n"; - - std::string GraphName = DOTTraits::getGraphName(G); - if (!GraphName.empty()) - O << "\tlabel=\"" << DOT::EscapeString(GraphName) << "\";\n"; - O << DOTTraits::getGraphProperties(G); - O << "\n"; - } - - void writeFooter() { - // Finish off the graph - O << "}\n"; - } - - void writeNodes() { - // Loop over the graph, printing it out... - for (node_iterator I = GTraits::nodes_begin(G), E = GTraits::nodes_end(G); - I != E; ++I) - writeNode(&*I); - } - - void writeNode(NodeType *Node) { - std::string NodeAttributes = DOTTraits::getNodeAttributes(Node); - - O << "\tNode" << reinterpret_cast(Node) << " [shape=record,"; - if (!NodeAttributes.empty()) O << NodeAttributes << ","; - O << "label=\"{" - << DOT::EscapeString(DOTTraits::getNodeLabel(Node, G)); - - // Print out the fields of the current node... - child_iterator EI = GTraits::child_begin(Node); - child_iterator EE = GTraits::child_end(Node); - if (EI != EE) { - O << "|{"; - - for (unsigned i = 0; EI != EE && i != 64; ++EI, ++i) { - if (i) O << "|"; - O << "" << DOTTraits::getEdgeSourceLabel(Node, EI); - } - - if (EI != EE) - O << "|truncated..."; - O << "}"; - } - O << "}\"];\n"; // Finish printing the "node" line - - // Output all of the edges now - EI = GTraits::child_begin(Node); - for (unsigned i = 0; EI != EE && i != 64; ++EI, ++i) - writeEdge(Node, i, EI); - for (; EI != EE; ++EI) - writeEdge(Node, 64, EI); - } - - void writeEdge(NodeType *Node, unsigned edgeidx, child_iterator EI) { - if (NodeType *TargetNode = *EI) { - int DestPort = -1; - if (DOTTraits::edgeTargetsEdgeSource(Node, EI)) { - child_iterator TargetIt = DOTTraits::getEdgeTarget(Node, EI); - - // Figure out which edge this targets... - unsigned Offset = std::distance(GTraits::child_begin(TargetNode), - TargetIt); - DestPort = static_cast(Offset); - } - - emitEdge(reinterpret_cast(Node), edgeidx, - reinterpret_cast(TargetNode), DestPort, - DOTTraits::getEdgeAttributes(Node, EI)); - } - } - - /// emitSimpleNode - Outputs a simple (non-record) node - void emitSimpleNode(const void *ID, const std::string &Attr, - const std::string &Label, unsigned NumEdgeSources = 0, - const std::vector *EdgeSourceLabels = 0) { - O << "\tNode" << ID << "[ "; - if (!Attr.empty()) - O << Attr << ","; - O << " label =\""; - if (NumEdgeSources) O << "{"; - O << DOT::EscapeString(Label); - if (NumEdgeSources) { - O << "|{"; - - for (unsigned i = 0; i != NumEdgeSources; ++i) { - if (i) O << "|"; - O << ""; - if (EdgeSourceLabels) O << (*EdgeSourceLabels)[i]; - } - O << "}}"; - } - O << "\"];\n"; - } - - /// emitEdge - Output an edge from a simple node into the graph... - void emitEdge(const void *SrcNodeID, int SrcNodePort, - const void *DestNodeID, int DestNodePort, - const std::string &Attrs) { - if (SrcNodePort > 64) return; // Eminating from truncated part? - if (DestNodePort > 64) DestNodePort = 64; // Targetting the truncated part? - - O << "\tNode" << SrcNodeID; - if (SrcNodePort >= 0) - O << ":g" << SrcNodePort; - O << " -> Node" << reinterpret_cast(DestNodeID); - if (DestNodePort >= 0) - O << ":g" << DestNodePort; - - if (!Attrs.empty()) - O << "[" << Attrs << "]"; - O << ";\n"; - } -}; - -template -std::ostream &WriteGraph(std::ostream &O, const GraphType &G, - const std::string &Name = "") { - // Start the graph emission process... - GraphWriter W(O, G); - - // Output the header for the graph... - W.writeHeader(Name); - - // Emit all of the nodes in the graph... - W.writeNodes(); - - // Output any customizations on the graph - DOTGraphTraits::addCustomGraphFeatures(G, W); - - // Output the end of the graph - W.writeFooter(); - return O; -} - -} // End llvm namespace - -#endif diff --git a/include/Support/HashExtras.h b/include/Support/HashExtras.h deleted file mode 100644 index 67f65b5f3ac..00000000000 --- a/include/Support/HashExtras.h +++ /dev/null @@ -1,41 +0,0 @@ -//===-- HashExtras.h - Useful functions for STL hash containers -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains some templates that are useful if you are working with the -// STL Hashed containers. -// -// No library is required when using these functinons. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_HASHEXTRAS_H -#define SUPPORT_HASHEXTRAS_H - -#include "Support/hash_map" -#include - -// Cannot specialize hash template from outside of the std namespace. -namespace HASH_NAMESPACE { - -template <> struct hash { - size_t operator()(std::string const &str) const { - return hash()(str.c_str()); - } -}; - -// Provide a hash function for arbitrary pointers... -template struct hash { - inline size_t operator()(const T *Val) const { - return reinterpret_cast(Val); - } -}; - -} // End namespace std - -#endif diff --git a/include/Support/LeakDetector.h b/include/Support/LeakDetector.h deleted file mode 100644 index e2ce9c50bea..00000000000 --- a/include/Support/LeakDetector.h +++ /dev/null @@ -1,91 +0,0 @@ -//===-- Support/LeakDetector.h - Provide simple leak detection --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines a class that can be used to provide very simple memory leak -// checks for an API. Basically LLVM uses this to make sure that Instructions, -// for example, are deleted when they are supposed to be, and not leaked away. -// -// When compiling with NDEBUG (Release build), this class does nothing, thus -// adding no checking overhead to release builds. Note that this class is -// implemented in a very simple way, requiring completely manual manipulation -// and checking for garbage, but this is intentional: users should not be using -// this API, only other APIs should. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_LEAKDETECTOR_H -#define SUPPORT_LEAKDETECTOR_H - -#include - -namespace llvm { - -class Value; - -struct LeakDetector { - /// addGarbageObject - Add a pointer to the internal set of "garbage" object - /// pointers. This should be called when objects are created, or if they are - /// taken out of an owning collection. - /// - static void addGarbageObject(void *Object) { -#ifndef NDEBUG - addGarbageObjectImpl(Object); -#endif - } - - /// removeGarbageObject - Remove a pointer from our internal representation of - /// our "garbage" objects. This should be called when an object is added to - /// an "owning" collection. - /// - static void removeGarbageObject(void *Object) { -#ifndef NDEBUG - removeGarbageObjectImpl(Object); -#endif - } - - /// checkForGarbage - Traverse the internal representation of garbage - /// pointers. If there are any pointers that have been add'ed, but not - /// remove'd, big obnoxious warnings about memory leaks are issued. - /// - /// The specified message will be printed indicating when the check was - /// performed. - /// - static void checkForGarbage(const std::string &Message) { -#ifndef NDEBUG - checkForGarbageImpl(Message); -#endif - } - - /// Overload the normal methods to work better with Value*'s because they are - /// by far the most common in LLVM. This does not affect the actual - /// functioning of this class, it just makes the warning messages nicer. - /// - static void addGarbageObject(const Value *Object) { -#ifndef NDEBUG - addGarbageObjectImpl(Object); -#endif - } - static void removeGarbageObject(const Value *Object) { -#ifndef NDEBUG - removeGarbageObjectImpl(Object); -#endif - } - -private: - // If we are debugging, the actual implementations will be called... - static void addGarbageObjectImpl(const Value *Object); - static void removeGarbageObjectImpl(const Value *Object); - static void addGarbageObjectImpl(void *Object); - static void removeGarbageObjectImpl(void *Object); - static void checkForGarbageImpl(const std::string &Message); -}; - -} // End llvm namespace - -#endif diff --git a/include/Support/MallocAllocator.h b/include/Support/MallocAllocator.h deleted file mode 100644 index 3e3da4139c1..00000000000 --- a/include/Support/MallocAllocator.h +++ /dev/null @@ -1,85 +0,0 @@ -//===-- Support/MallocAllocator.h - Allocator using malloc/free -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines MallocAllocator class, an STL compatible allocator which -// just uses malloc/free to get and release memory. The default allocator uses -// the STL pool allocator runtime library, this explicitly avoids it. -// -// This file is used for variety of purposes, including the pool allocator -// project and testing, regardless of whether or not it's used directly in the -// LLVM code, so don't delete this from CVS if you think it's unused! -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_MALLOCALLOCATOR_H -#define SUPPORT_MALLOCALLOCATOR_H - -#include -#include - -namespace llvm { - -template -struct MallocAllocator { - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef T* pointer; - typedef const T* const_pointer; - typedef T& reference; - typedef const T& const_reference; - typedef T value_type; - template struct rebind { - typedef MallocAllocator other; - }; - - template - MallocAllocator(const MallocAllocator &) {} - MallocAllocator() {} - - pointer address(reference x) const { return &x; } - const_pointer address(const_reference x) const { return &x; } - size_type max_size() const { return ~0 / sizeof(T); } - - static pointer allocate(size_t n, void* hint = 0) { - return static_cast(malloc(n*sizeof(T))); - } - - static void deallocate(pointer p, size_t n) { - free(static_cast(p)); - } - - void construct(pointer p, const T &val) { - new(static_cast(p)) T(val); - } - void destroy(pointer p) { - p->~T(); - } -}; - -template -inline bool operator==(const MallocAllocator &, const MallocAllocator &) { - return true; -} -template -inline bool operator!=(const MallocAllocator&, const MallocAllocator&) { - return false; -} -} // End llvm namespace - -namespace std { - template - struct _Alloc_traits > { - static const bool _S_instanceless = true; - typedef ::llvm::MallocAllocator base_alloc_type; - typedef ::llvm::MallocAllocator _Alloc_type; - typedef ::llvm::MallocAllocator allocator_type; - }; -} - -#endif diff --git a/include/Support/MathExtras.h b/include/Support/MathExtras.h deleted file mode 100644 index c1384d3eff5..00000000000 --- a/include/Support/MathExtras.h +++ /dev/null @@ -1,59 +0,0 @@ -//===-- Support/MathExtras.h - Useful math functions ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains some functions that are useful for math stuff. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_MATHEXTRAS_H -#define SUPPORT_MATHEXTRAS_H - -#include "Support/DataTypes.h" - -namespace llvm { - -#if defined(log2) -# undef log2 -#endif - -inline unsigned log2(uint64_t C) { - unsigned getPow; - for (getPow = 0; C > 1; ++getPow) - C >>= 1; - return getPow; -} - -inline unsigned log2(unsigned C) { - unsigned getPow; - for (getPow = 0; C > 1; ++getPow) - C >>= 1; - return getPow; -} - -inline bool isPowerOf2(int64_t C, unsigned &getPow) { - if (C < 0) C = -C; - if (C > 0 && C == (C & ~(C - 1))) { - getPow = log2(static_cast(C)); - return true; - } - - return false; -} - -// Platform-independent wrappers for the C99 isnan() function. -int IsNAN (float f); -int IsNAN (double d); - -// Platform-independent wrappers for the C99 isinf() function. -int IsInf (float f); -int IsInf (double d); - -} // End llvm namespace - -#endif diff --git a/include/Support/PluginLoader.h b/include/Support/PluginLoader.h deleted file mode 100644 index 7410895c3af..00000000000 --- a/include/Support/PluginLoader.h +++ /dev/null @@ -1,35 +0,0 @@ -//===-- Support/PluginLoader.h - Provide -load option to tool ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// A tool can #include this file to get a -load option that allows the user to -// load arbitrary shared objects into the tool's address space. Note that this -// header can only be included by a program ONCE, so it should never to used by -// library authors. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_PLUGINLOADER_H -#define SUPPORT_PLUGINLOADER_H - -#include "Support/CommandLine.h" - -namespace llvm { - struct PluginLoader { - void operator=(const std::string &Filename); - }; - -#ifndef DONT_GET_PLUGIN_LOADER_OPTION - // This causes operator= above to be invoked for every -load option. - static cl::opt > - LoadOpt("load", cl::ZeroOrMore, cl::value_desc("pluginfilename"), - cl::desc("Load the specified plugin")); -#endif -} - -#endif diff --git a/include/Support/PostOrderIterator.h b/include/Support/PostOrderIterator.h deleted file mode 100644 index d66c4b84c40..00000000000 --- a/include/Support/PostOrderIterator.h +++ /dev/null @@ -1,156 +0,0 @@ -//===- Support/PostOrderIterator.h - Generic PostOrder iterator -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file builds on the Support/GraphTraits.h file to build a generic graph -// post order iterator. This should work over any graph type that has a -// GraphTraits specialization. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_POSTORDERITERATOR_H -#define SUPPORT_POSTORDERITERATOR_H - -#include "Support/GraphTraits.h" -#include "Support/iterator" -#include -#include - -namespace llvm { - -template > -class po_iterator : public forward_iterator { - typedef forward_iterator super; - typedef typename GT::NodeType NodeType; - typedef typename GT::ChildIteratorType ChildItTy; - - std::set Visited; // All of the blocks visited so far... - // VisitStack - Used to maintain the ordering. Top = current block - // First element is basic block pointer, second is the 'next child' to visit - std::stack > VisitStack; - - void traverseChild() { - while (VisitStack.top().second != GT::child_end(VisitStack.top().first)) { - NodeType *BB = *VisitStack.top().second++; - if (!Visited.count(BB)) { // If the block is not visited... - Visited.insert(BB); - VisitStack.push(make_pair(BB, GT::child_begin(BB))); - } - } - } - - inline po_iterator(NodeType *BB) { - Visited.insert(BB); - VisitStack.push(make_pair(BB, GT::child_begin(BB))); - traverseChild(); - } - inline po_iterator() { /* End is when stack is empty */ } -public: - typedef typename super::pointer pointer; - typedef po_iterator _Self; - - // Provide static "constructors"... - static inline _Self begin(GraphT G) { return _Self(GT::getEntryNode(G)); } - static inline _Self end (GraphT G) { return _Self(); } - - inline bool operator==(const _Self& x) const { - return VisitStack == x.VisitStack; - } - inline bool operator!=(const _Self& x) const { return !operator==(x); } - - inline pointer operator*() const { - return VisitStack.top().first; - } - - // This is a nonstandard operator-> that dereferences the pointer an extra - // time... so that you can actually call methods ON the BasicBlock, because - // the contained type is a pointer. This allows BBIt->getTerminator() f.e. - // - inline NodeType *operator->() const { return operator*(); } - - inline _Self& operator++() { // Preincrement - VisitStack.pop(); - if (!VisitStack.empty()) - traverseChild(); - return *this; - } - - inline _Self operator++(int) { // Postincrement - _Self tmp = *this; ++*this; return tmp; - } -}; - -// Provide global constructors that automatically figure out correct types... -// -template -po_iterator po_begin(T G) { return po_iterator::begin(G); } -template -po_iterator po_end (T G) { return po_iterator::end(G); } - -// Provide global definitions of inverse post order iterators... -template -struct ipo_iterator : public po_iterator > { - ipo_iterator(const po_iterator > &V) :po_iterator >(V){} -}; - -template -ipo_iterator ipo_begin(T G, bool Reverse = false) { - return ipo_iterator::begin(G, Reverse); -} - -template -ipo_iterator ipo_end(T G){ - return ipo_iterator::end(G); -} - - -//===--------------------------------------------------------------------===// -// Reverse Post Order CFG iterator code -//===--------------------------------------------------------------------===// -// -// This is used to visit basic blocks in a method in reverse post order. This -// class is awkward to use because I don't know a good incremental algorithm to -// computer RPO from a graph. Because of this, the construction of the -// ReversePostOrderTraversal object is expensive (it must walk the entire graph -// with a postorder iterator to build the data structures). The moral of this -// story is: Don't create more ReversePostOrderTraversal classes than necessary. -// -// This class should be used like this: -// { -// ReversePostOrderTraversal RPOT(FuncPtr); // Expensive to create -// for (rpo_iterator I = RPOT.begin(); I != RPOT.end(); ++I) { -// ... -// } -// for (rpo_iterator I = RPOT.begin(); I != RPOT.end(); ++I) { -// ... -// } -// } -// - -template > -class ReversePostOrderTraversal { - typedef typename GT::NodeType NodeType; - std::vector Blocks; // Block list in normal PO order - inline void Initialize(NodeType *BB) { - copy(po_begin(BB), po_end(BB), back_inserter(Blocks)); - } -public: - typedef typename std::vector::reverse_iterator rpo_iterator; - - inline ReversePostOrderTraversal(GraphT G) { - Initialize(GT::getEntryNode(G)); - } - - // Because we want a reverse post order, use reverse iterators from the vector - inline rpo_iterator begin() { return Blocks.rbegin(); } - inline rpo_iterator end() { return Blocks.rend(); } -}; - -} // End llvm namespace - -#endif diff --git a/include/Support/SCCIterator.h b/include/Support/SCCIterator.h deleted file mode 100644 index 2ea780ca92d..00000000000 --- a/include/Support/SCCIterator.h +++ /dev/null @@ -1,199 +0,0 @@ -//===-- Support/SCCIterator.h - SCC iterator --------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This builds on the Support/GraphTraits.h file to find the strongly connected -// components (SCCs) of a graph in O(N+E) time using Tarjan's DFS algorithm. -// -// The SCC iterator has the important property that if a node in SCC S1 has an -// edge to a node in SCC S2, then it visits S1 *after* S2. -// -// To visit S1 *before* S2, use the scc_iterator on the Inverse graph. -// (NOTE: This requires some simple wrappers and is not supported yet.) -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_SCCITERATOR_H -#define SUPPORT_SCCITERATOR_H - -#include "Support/GraphTraits.h" -#include "Support/iterator" -#include -#include - -namespace llvm { - -//===----------------------------------------------------------------------===// -/// -/// scc_iterator - Enumerate the SCCs of a directed graph, in -/// reverse topological order of the SCC DAG. -/// -template > -class scc_iterator - : public forward_iterator, ptrdiff_t> { - typedef typename GT::NodeType NodeType; - typedef typename GT::ChildIteratorType ChildItTy; - typedef std::vector SccTy; - typedef forward_iterator super; - typedef typename super::reference reference; - typedef typename super::pointer pointer; - - // The visit counters used to detect when a complete SCC is on the stack. - // visitNum is the global counter. - // nodeVisitNumbers are per-node visit numbers, also used as DFS flags. - unsigned visitNum; - std::map nodeVisitNumbers; - - // SCCNodeStack - Stack holding nodes of the SCC. - std::vector SCCNodeStack; - - // CurrentSCC - The current SCC, retrieved using operator*(). - SccTy CurrentSCC; - - // VisitStack - Used to maintain the ordering. Top = current block - // First element is basic block pointer, second is the 'next child' to visit - std::vector > VisitStack; - - // MinVistNumStack - Stack holding the "min" values for each node in the DFS. - // This is used to track the minimum uplink values for all children of - // the corresponding node on the VisitStack. - std::vector MinVisitNumStack; - - // A single "visit" within the non-recursive DFS traversal. - void DFSVisitOne(NodeType* N) { - ++visitNum; // Global counter for the visit order - nodeVisitNumbers[N] = visitNum; - SCCNodeStack.push_back(N); - MinVisitNumStack.push_back(visitNum); - VisitStack.push_back(std::make_pair(N, GT::child_begin(N))); - //DEBUG(std::cerr << "TarjanSCC: Node " << N << - // " : visitNum = " << visitNum << "\n"); - } - - // The stack-based DFS traversal; defined below. - void DFSVisitChildren() { - assert(!VisitStack.empty()); - while (VisitStack.back().second != GT::child_end(VisitStack.back().first)) { - // TOS has at least one more child so continue DFS - NodeType *childN = *VisitStack.back().second++; - if (!nodeVisitNumbers.count(childN)) { - // this node has never been seen - DFSVisitOne(childN); - } else { - unsigned childNum = nodeVisitNumbers[childN]; - if (MinVisitNumStack.back() > childNum) - MinVisitNumStack.back() = childNum; - } - } - } - - // Compute the next SCC using the DFS traversal. - void GetNextSCC() { - assert(VisitStack.size() == MinVisitNumStack.size()); - CurrentSCC.clear(); // Prepare to compute the next SCC - while (!VisitStack.empty()) { - DFSVisitChildren(); - assert(VisitStack.back().second ==GT::child_end(VisitStack.back().first)); - NodeType* visitingN = VisitStack.back().first; - unsigned minVisitNum = MinVisitNumStack.back(); - VisitStack.pop_back(); - MinVisitNumStack.pop_back(); - if (!MinVisitNumStack.empty() && MinVisitNumStack.back() > minVisitNum) - MinVisitNumStack.back() = minVisitNum; - - //DEBUG(std::cerr << "TarjanSCC: Popped node " << visitingN << - // " : minVisitNum = " << minVisitNum << "; Node visit num = " << - // nodeVisitNumbers[visitingN] << "\n"); - - if (minVisitNum == nodeVisitNumbers[visitingN]) { - // A full SCC is on the SCCNodeStack! It includes all nodes below - // visitingN on the stack. Copy those nodes to CurrentSCC, - // reset their minVisit values, and return (this suspends - // the DFS traversal till the next ++). - do { - CurrentSCC.push_back(SCCNodeStack.back()); - SCCNodeStack.pop_back(); - nodeVisitNumbers[CurrentSCC.back()] = ~0UL; - } while (CurrentSCC.back() != visitingN); - return; - } - } - } - - inline scc_iterator(NodeType *entryN) : visitNum(0) { - DFSVisitOne(entryN); - GetNextSCC(); - } - inline scc_iterator() { /* End is when DFS stack is empty */ } - -public: - typedef scc_iterator _Self; - - // Provide static "constructors"... - static inline _Self begin(GraphT& G) { return _Self(GT::getEntryNode(G)); } - static inline _Self end (GraphT& G) { return _Self(); } - - // Direct loop termination test (I.fini() is more efficient than I == end()) - inline bool fini() const { - assert(!CurrentSCC.empty() || VisitStack.empty()); - return CurrentSCC.empty(); - } - - inline bool operator==(const _Self& x) const { - return VisitStack == x.VisitStack && CurrentSCC == x.CurrentSCC; - } - inline bool operator!=(const _Self& x) const { return !operator==(x); } - - // Iterator traversal: forward iteration only - inline _Self& operator++() { // Preincrement - GetNextSCC(); - return *this; - } - inline _Self operator++(int) { // Postincrement - _Self tmp = *this; ++*this; return tmp; - } - - // Retrieve a reference to the current SCC - inline const SccTy &operator*() const { - assert(!CurrentSCC.empty() && "Dereferencing END SCC iterator!"); - return CurrentSCC; - } - inline SccTy &operator*() { - assert(!CurrentSCC.empty() && "Dereferencing END SCC iterator!"); - return CurrentSCC; - } - - // hasLoop() -- Test if the current SCC has a loop. If it has more than one - // node, this is trivially true. If not, it may still contain a loop if the - // node has an edge back to itself. - bool hasLoop() const { - assert(!CurrentSCC.empty() && "Dereferencing END SCC iterator!"); - if (CurrentSCC.size() > 1) return true; - NodeType *N = CurrentSCC.front(); - for (ChildItTy CI = GT::child_begin(N), CE=GT::child_end(N); CI != CE; ++CI) - if (*CI == N) - return true; - return false; - } -}; - - -// Global constructor for the SCC iterator. -template -scc_iterator scc_begin(T G) { - return scc_iterator::begin(G); -} - -template -scc_iterator scc_end(T G) { - return scc_iterator::end(G); -} - -} // End llvm namespace - -#endif diff --git a/include/Support/STLExtras.h b/include/Support/STLExtras.h deleted file mode 100644 index b6379d26232..00000000000 --- a/include/Support/STLExtras.h +++ /dev/null @@ -1,310 +0,0 @@ -//===- STLExtras.h - Useful functions when working with the STL -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains some templates that are useful if you are working with the -// STL at all. -// -// No library is required when using these functinons. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_STLEXTRAS_H -#define SUPPORT_STLEXTRAS_H - -#include -#include // for std::pair -#include "Support/iterator" - -namespace llvm { - -//===----------------------------------------------------------------------===// -// Extra additions to -//===----------------------------------------------------------------------===// - -// bind_obj - Often times you want to apply the member function of an object -// as a unary functor. This macro is shorthand that makes it happen less -// verbosely. -// -// Example: -// struct Summer { void accumulate(int x); } -// vector Numbers; -// Summer MyS; -// for_each(Numbers.begin(), Numbers.end(), -// bind_obj(&MyS, &Summer::accumulate)); -// -// TODO: When I get lots of extra time, convert this from an evil macro -// -#define bind_obj(OBJ, METHOD) std::bind1st(std::mem_fun(METHOD), OBJ) - - -// bitwise_or - This is a simple functor that applys operator| on its two -// arguments to get a boolean result. -// -template -struct bitwise_or : public std::binary_function { - bool operator()(const Ty& left, const Ty& right) const { - return left | right; - } -}; - -template -struct less_ptr : public std::binary_function { - bool operator()(const Ty* left, const Ty* right) const { - return *left < *right; - } -}; - -template -struct greater_ptr : public std::binary_function { - bool operator()(const Ty* left, const Ty* right) const { - return *right < *left; - } -}; - -// deleter - Very very very simple method that is used to invoke operator -// delete on something. It is used like this: -// -// for_each(V.begin(), B.end(), deleter); -// -template -static inline void deleter(T *Ptr) { - delete Ptr; -} - - - -//===----------------------------------------------------------------------===// -// Extra additions to -//===----------------------------------------------------------------------===// - -// mapped_iterator - This is a simple iterator adapter that causes a function to -// be dereferenced whenever operator* is invoked on the iterator. -// -template -class mapped_iterator { - RootIt current; - UnaryFunc Fn; -public: - typedef typename std::iterator_traits::iterator_category - iterator_category; - typedef typename std::iterator_traits::difference_type - difference_type; - typedef typename UnaryFunc::result_type value_type; - - typedef void pointer; - //typedef typename UnaryFunc::result_type *pointer; - typedef void reference; // Can't modify value returned by fn - - typedef RootIt iterator_type; - typedef mapped_iterator _Self; - - inline RootIt &getCurrent() const { return current; } - - inline explicit mapped_iterator(const RootIt &I, UnaryFunc F) - : current(I), Fn(F) {} - inline mapped_iterator(const mapped_iterator &It) - : current(It.current), Fn(It.Fn) {} - - inline value_type operator*() const { // All this work to do this - return Fn(*current); // little change - } - - _Self& operator++() { ++current; return *this; } - _Self& operator--() { --current; return *this; } - _Self operator++(int) { _Self __tmp = *this; ++current; return __tmp; } - _Self operator--(int) { _Self __tmp = *this; --current; return __tmp; } - _Self operator+ (difference_type n) const { return _Self(current + n); } - _Self& operator+= (difference_type n) { current += n; return *this; } - _Self operator- (difference_type n) const { return _Self(current - n); } - _Self& operator-= (difference_type n) { current -= n; return *this; } - reference operator[](difference_type n) const { return *(*this + n); } - - inline bool operator!=(const _Self &X) const { return !operator==(X); } - inline bool operator==(const _Self &X) const { return current == X.current; } - inline bool operator< (const _Self &X) const { return current < X.current; } - - inline difference_type operator-(const _Self &X) const { - return current - X.current; - } -}; - -template -inline mapped_iterator<_Iterator, Func> -operator+(typename mapped_iterator<_Iterator, Func>::difference_type N, - const mapped_iterator<_Iterator, Func>& X) { - return mapped_iterator<_Iterator, Func>(X.getCurrent() - N); -} - - -// map_iterator - Provide a convenient way to create mapped_iterators, just like -// make_pair is useful for creating pairs... -// -template -inline mapped_iterator map_iterator(const ItTy &I, FuncTy F) { - return mapped_iterator(I, F); -} - - -// next/prior - These functions unlike std::advance do not modify the -// passed iterator but return a copy. -// -// next(myIt) returns copy of myIt incremented once -// next(myIt, n) returns copy of myIt incremented n times -// prior(myIt) returns copy of myIt decremented once -// prior(myIt, n) returns copy of myIt decremented n times - -template -inline ItTy next(ItTy it, Dist n) -{ - std::advance(it, n); - return it; -} - -template -inline ItTy next(ItTy it) -{ - std::advance(it, 1); - return it; -} - -template -inline ItTy prior(ItTy it, Dist n) -{ - std::advance(it, -n); - return it; -} - -template -inline ItTy prior(ItTy it) -{ - std::advance(it, -1); - return it; -} - - -//===----------------------------------------------------------------------===// -// Extra additions to -//===----------------------------------------------------------------------===// - -// apply_until - Apply a functor to a sequence continually, unless the -// functor returns true. Return true if the functor returned true, return false -// if the functor never returned true. -// -template -bool apply_until(InputIt First, InputIt Last, Function Func) { - for ( ; First != Last; ++First) - if (Func(*First)) return true; - return false; -} - - -// reduce - Reduce a sequence values into a single value, given an initial -// value and an operator. -// -template -ValueType reduce(InputIt First, InputIt Last, Function Func, ValueType Value) { - for ( ; First != Last; ++First) - Value = Func(*First, Value); - return Value; -} - -#if 1 // This is likely to be more efficient - -// reduce_apply - Reduce the result of applying a function to each value in a -// sequence, given an initial value, an operator, a function, and a sequence. -// -template -inline ValueType reduce_apply(InputIt First, InputIt Last, Function Func, - ValueType Value, TransFunc XForm) { - for ( ; First != Last; ++First) - Value = Func(XForm(*First), Value); - return Value; -} - -#else // This is arguably more elegant - -// reduce_apply - Reduce the result of applying a function to each value in a -// sequence, given an initial value, an operator, a function, and a sequence. -// -template -inline ValueType reduce_apply2(InputIt First, InputIt Last, Function Func, - ValueType Value, TransFunc XForm) { - return reduce(map_iterator(First, XForm), map_iterator(Last, XForm), - Func, Value); -} -#endif - - -// reduce_apply_bool - Reduce the result of applying a (bool returning) function -// to each value in a sequence. All of the bools returned by the mapped -// function are bitwise or'd together, and the result is returned. -// -template -inline bool reduce_apply_bool(InputIt First, InputIt Last, Function Func) { - return reduce_apply(First, Last, bitwise_or(), false, Func); -} - - -// map - This function maps the specified input sequence into the specified -// output iterator, applying a unary function in between. -// -template -inline OutIt mapto(InIt Begin, InIt End, OutIt Dest, Functor F) { - return copy(map_iterator(Begin, F), map_iterator(End, F), Dest); -} - - -//===----------------------------------------------------------------------===// -// Extra additions to -//===----------------------------------------------------------------------===// - -// tie - this function ties two objects and returns a temporary object -// that is assignable from a std::pair. This can be used to make code -// more readable when using values returned from functions bundled in -// a std::pair. Since an example is worth 1000 words: -// -// typedef std::map Int2IntMap; -// -// Int2IntMap myMap; -// Int2IntMap::iterator where; -// bool inserted; -// tie(where, inserted) = myMap.insert(std::make_pair(123,456)); -// -// if (inserted) -// // do stuff -// else -// // do other stuff - -namespace -{ - template - struct tier { - typedef T1 &first_type; - typedef T2 &second_type; - - first_type first; - second_type second; - - tier(first_type f, second_type s) : first(f), second(s) { } - tier& operator=(const std::pair& p) { - first = p.first; - second = p.second; - return *this; - } - }; -} - -template -inline tier tie(T1& f, T2& s) { - return tier(f, s); -} - -} // End llvm namespace - -#endif diff --git a/include/Support/SetOperations.h b/include/Support/SetOperations.h deleted file mode 100644 index bb1e68e6b29..00000000000 --- a/include/Support/SetOperations.h +++ /dev/null @@ -1,71 +0,0 @@ -//===-- Support/SetOperations.h - Generic Set Operations --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines generic set operations that may be used on set's of -// different types, and different element types. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_SETOPERATIONS_H -#define SUPPORT_SETOPERATIONS_H - -namespace llvm { - -// set_union(A, B) - Compute A := A u B, return whether A changed. -// -template -bool set_union(S1Ty &S1, const S2Ty &S2) { - bool Changed = false; - - for (typename S2Ty::const_iterator SI = S2.begin(), SE = S2.end(); - SI != SE; ++SI) - if (S1.insert(*SI).second) - Changed = true; - - return Changed; -} - -// set_intersect(A, B) - Compute A := A ^ B -// Identical to set_intersection, except that it works on set<>'s and -// is nicer to use. Functionally, this iterates through S1, removing -// elements that are not contained in S2. -// -template class S1Ty, class ETy, class S2Ty> -void set_intersect(S1Ty &S1, const S2Ty &S2) { - for (typename S1Ty::iterator I = S1.begin(); I != S1.end();) { - const ETy &E = *I; - ++I; - if (!S2.count(E)) S1.erase(E); // Erase element if not in S2 - } -} - -// set_difference(A, B) - Return A - B -// -template -S1Ty set_difference(const S1Ty &S1, const S2Ty &S2) { - S1Ty Result; - for (typename S1Ty::const_iterator SI = S1.begin(), SE = S1.end(); - SI != SE; ++SI) - if (!S2.count(*SI)) // if the element is not in set2 - Result.insert(*SI); - return Result; -} - -// set_subtract(A, B) - Compute A := A - B -// -template -void set_subtract(S1Ty &S1, const S2Ty &S2) { - for (typename S2Ty::const_iterator SI = S2.begin(), SE = S2.end(); - SI != SE; ++SI) - S1.erase(*SI); -} - -} // End llvm namespace - -#endif diff --git a/include/Support/SetVector.h b/include/Support/SetVector.h deleted file mode 100644 index c72f49bce89..00000000000 --- a/include/Support/SetVector.h +++ /dev/null @@ -1,138 +0,0 @@ -//===- SetVector.h - A set with insertion order iteration -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by Reid Spencer and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements a set that has insertion order iteration -// characteristics. This is useful for keeping a set of things that need to be -// visited later but in a deterministic order (insertion order). The interface -// is purposefully minimal. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_SETVECTOR_H -#define SUPPORT_SETVECTOR_H - -#include -#include -#include - -namespace llvm { - -/// This class provides a way to keep a set of things that also has the -/// property of a deterministic iteration order. The order of iteration is the -/// order of insertion. -/// @brief A vector that has set insertion semantics. -template -class SetVector { -public: - typedef T value_type; - typedef T key_type; - typedef T& reference; - typedef const T& const_reference; - typedef std::set set_type; - typedef std::vector vector_type; - typedef typename vector_type::iterator iterator; - typedef typename vector_type::const_iterator const_iterator; - typedef typename vector_type::size_type size_type; - - /// @brief Construct an empty SetVector - SetVector() {} - - /// @brief Initialize a SetVector with a range of elements - template - SetVector(It Start, It End) { - insert(Start, End); - } - - /// @brief Determine if the SetVector is empty or not. - bool empty() const { - return vector_.empty(); - } - - /// @brief Determine the number of elements in the SetVector. - size_type size() const { - return vector_.size(); - } - - /// @brief Get an iterator to the beginning of the SetVector. - iterator begin() { - return vector_.begin(); - } - - /// @brief Get a const_iterator to the beginning of the SetVector. - const_iterator begin() const { - return vector_.begin(); - } - - /// @brief Get an iterator to the end of the SetVector. - iterator end() { - return vector_.end(); - } - - /// @brief Get a const_iterator to the end of the SetVector. - const_iterator end() const { - return vector_.end(); - } - - /// @brief Return the last element of the SetVector. - const T &back() const { - assert(!empty() && "Cannot call back() on empty SetVector!"); - return vector_.back(); - } - - /// @brief Index into the SetVector. - const_reference operator[](size_type n) const { - assert(n < vector_.size() && "SetVector access out of range!"); - return vector_[n]; - } - - /// @returns true iff the element was inserted into the SetVector. - /// @brief Insert a new element into the SetVector. - bool insert(const value_type &X) { - bool result = set_.insert(X).second; - if (result) - vector_.push_back(X); - return result; - } - - /// @brief Insert a range of elements into the SetVector. - template - void insert(It Start, It End) { - for (; Start != End; ++Start) - if (set_.insert(*Start).second) - vector_.push_back(*Start); - } - - /// @returns 0 if the element is not in the SetVector, 1 if it is. - /// @brief Count the number of elements of a given key in the SetVector. - size_type count(const key_type &key) const { - return set_.count(key); - } - - /// @brief Completely clear the SetVector - void clear() { - set_.clear(); - vector_.clear(); - } - - /// @brief Remove the last element of the SetVector. - void pop_back() { - assert(!empty() && "Cannot remove an element from an empty SetVector!"); - set_.erase(back()); - vector_.pop_back(); - } - -private: - set_type set_; ///< The set. - vector_type vector_; ///< The vector. -}; - -} // End llvm namespace - -// vim: sw=2 ai -#endif diff --git a/include/Support/SlowOperationInformer.h b/include/Support/SlowOperationInformer.h deleted file mode 100644 index 67edf7df42b..00000000000 --- a/include/Support/SlowOperationInformer.h +++ /dev/null @@ -1,65 +0,0 @@ -//===- SlowOperationInformer.h - Keep the user informed ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines a simple object which can be used to let the user know what -// is going on when a slow operation is happening, and gives them the ability to -// cancel it. Potentially slow operations can stack allocate one of these -// objects, and periodically call the "progress" method to update the progress -// bar. If the operation takes more than 1 second to complete, the progress bar -// is automatically shown and updated. As such, the slow operation should not -// print stuff to the screen, and should not be confused if an extra line -// appears on the screen (ie, the cursor should be at the start of the line). -// -// If the user presses CTRL-C during the operation, the next invocation of the -// progress method with throw an std::string object indicating that the -// operation was cancelled. As such, client code must be exception safe around -// the progress method. -// -// Because SlowOperationInformers fiddle around with signals, they cannot be -// nested, and interact poorly with threads. The SIGALRM handler is set back to -// SIGDFL, but the SIGINT signal handler is restored when the -// SlowOperationInformer is destroyed. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_SLOW_OPERATION_INFORMER_H -#define SUPPORT_SLOW_OPERATION_INFORMER_H - -#include -#include - -namespace llvm { - class SlowOperationInformer { - std::string OperationName; - unsigned LastPrintAmount; - - SlowOperationInformer(const SlowOperationInformer&); // DO NOT IMPLEMENT - void operator=(const SlowOperationInformer&); // DO NOT IMPLEMENT - public: - SlowOperationInformer(const std::string &Name); - ~SlowOperationInformer(); - - /// progress - Clients should periodically call this method when they are in - /// an exception-safe state. The Amount variable should indicate how far - /// along the operation is, given in 1/10ths of a percent (in other words, - /// Amount should range from 0 to 1000). - void progress(unsigned Amount); - - /// progress - Same as the method above, but this performs the division for - /// you, and helps you avoid overflow if you are dealing with largish - /// numbers. - void progress(unsigned Current, unsigned Maximum) { - assert(Maximum != 0 && - "Shouldn't be doing work if there is nothing to do!"); - progress(Current*1000ULL/Maximum); - } - }; -} // end namespace llvm - -#endif /* SLOW_OPERATION_INFORMER_H */ diff --git a/include/Support/Statistic.h b/include/Support/Statistic.h deleted file mode 100644 index 79d8f9d66ed..00000000000 --- a/include/Support/Statistic.h +++ /dev/null @@ -1,89 +0,0 @@ -//===-- Support/Statistic.h - Easy way to expose stats ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the 'Statistic' class, which is designed to be an easy way -// to expose various success metrics from passes. These statistics are printed -// at the end of a run, when the -stats command line option is enabled on the -// command line. -// -// This is useful for reporting information like the number of instructions -// simplified, optimized or removed by various transformations, like this: -// -// static Statistic<> NumInstsKilled("gcse", "Number of instructions killed"); -// -// Later, in the code: ++NumInstsKilled; -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_STATISTIC_H -#define SUPPORT_STATISTIC_H - -#include - -namespace llvm { - -// StatisticBase - Nontemplated base class for Statistic<> class... -class StatisticBase { - const char *Name; - const char *Desc; - static unsigned NumStats; -protected: - StatisticBase(const char *name, const char *desc) : Name(name), Desc(desc) { - ++NumStats; // Keep track of how many stats are created... - } - virtual ~StatisticBase() {} - - // destroy - Called by subclass dtor so that we can still invoke virtual - // functions on the subclass. - void destroy() const; - - // printValue - Overridden by template class to print out the value type... - virtual void printValue(std::ostream &o) const = 0; - - // hasSomeData - Return true if some data has been aquired. Avoid printing - // lots of zero counts. - // - virtual bool hasSomeData() const = 0; -}; - -// Statistic Class - templated on the data type we are monitoring... -template -class Statistic : private StatisticBase { - DataType Value; - - virtual void printValue(std::ostream &o) const { o << Value; } - virtual bool hasSomeData() const { return Value != DataType(); } -public: - // Normal constructor, default initialize data item... - Statistic(const char *name, const char *desc) - : StatisticBase(name, desc), Value(DataType()) {} - - // Constructor to provide an initial value... - Statistic(const DataType &Val, const char *name, const char *desc) - : StatisticBase(name, desc), Value(Val) {} - - // Print information when destroyed, iff command line option is specified - ~Statistic() { destroy(); } - - // Allow use of this class as the value itself... - operator DataType() const { return Value; } - const Statistic &operator=(DataType Val) { Value = Val; return *this; } - const Statistic &operator++() { ++Value; return *this; } - DataType operator++(int) { return Value++; } - const Statistic &operator--() { --Value; return *this; } - DataType operator--(int) { return Value--; } - const Statistic &operator+=(const DataType &V) { Value += V; return *this; } - const Statistic &operator-=(const DataType &V) { Value -= V; return *this; } - const Statistic &operator*=(const DataType &V) { Value *= V; return *this; } - const Statistic &operator/=(const DataType &V) { Value /= V; return *this; } -}; - -} // End llvm namespace - -#endif diff --git a/include/Support/StringExtras.h b/include/Support/StringExtras.h deleted file mode 100644 index fcfa65f232f..00000000000 --- a/include/Support/StringExtras.h +++ /dev/null @@ -1,125 +0,0 @@ -//===-- Support/StringExtras.h - Useful string functions --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains some functions that are useful when dealing with strings. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_STRINGEXTRAS_H -#define SUPPORT_STRINGEXTRAS_H - -#include "Support/DataTypes.h" -#include -#include -#include - -namespace llvm { - -static inline std::string utohexstr(uint64_t X) { - char Buffer[40]; - char *BufPtr = Buffer+39; - - *BufPtr = 0; // Null terminate buffer... - if (X == 0) *--BufPtr = '0'; // Handle special case... - - while (X) { - unsigned char Mod = (unsigned char)X & 15; - if (Mod < 10) - *--BufPtr = '0' + Mod; - else - *--BufPtr = 'A' + Mod-10; - X >>= 4; - } - return std::string(BufPtr); -} - -static inline std::string utostr(unsigned long long X, bool isNeg = false) { - char Buffer[40]; - char *BufPtr = Buffer+39; - - *BufPtr = 0; // Null terminate buffer... - if (X == 0) *--BufPtr = '0'; // Handle special case... - - while (X) { - *--BufPtr = '0' + char(X % 10); - X /= 10; - } - - if (isNeg) *--BufPtr = '-'; // Add negative sign... - return std::string(BufPtr); -} - -static inline std::string utostr(unsigned long X, bool isNeg = false) { - return utostr(static_cast(X), isNeg); -} - -static inline std::string utostr(unsigned X, bool isNeg = false) { - char Buffer[20]; - char *BufPtr = Buffer+19; - - *BufPtr = 0; // Null terminate buffer... - if (X == 0) *--BufPtr = '0'; // Handle special case... - - while (X) { - *--BufPtr = '0' + char(X % 10); - X /= 10; - } - - if (isNeg) *--BufPtr = '-'; // Add negative sign... - - return std::string(BufPtr); -} - -static inline std::string itostr(long long X) { - if (X < 0) - return utostr(static_cast(-X), true); - else - return utostr(static_cast(X)); -} - -static inline std::string itostr(long X) { - if (X < 0) - return utostr(static_cast(-X), true); - else - return utostr(static_cast(X)); -} - -static inline std::string itostr(int X) { - if (X < 0) - return utostr(static_cast(-X), true); - else - return utostr(static_cast(X)); -} - -static inline std::string ftostr(double V) { - char Buffer[200]; - sprintf(Buffer, "%20.6e", V); - return Buffer; -} - -static inline std::string LowercaseString(const std::string &S) { - std::string result(S); - for (unsigned i = 0; i < S.length(); ++i) - if (isupper(result[i])) - result[i] = (char)tolower(result[i]); - return result; -} - -/// getToken - This function extracts one token from source, ignoring any -/// leading characters that appear in the Delimiters string, and ending the -/// token at any of the characters that appear in the Delimiters string. If -/// there are no tokens in the source string, an empty string is returned. -/// The Source source string is updated in place to remove the returned string -/// and any delimiter prefix from it. -std::string getToken(std::string &Source, - const char *Delimiters = " \t\n\v\f\r"); - -} // End llvm namespace - -#endif diff --git a/include/Support/SystemUtils.h b/include/Support/SystemUtils.h deleted file mode 100644 index b8c130cc974..00000000000 --- a/include/Support/SystemUtils.h +++ /dev/null @@ -1,65 +0,0 @@ -//===- SystemUtils.h - Utilities to do low-level system stuff ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains functions used to do a variety of low-level, often -// system-specific, tasks. -// -//===----------------------------------------------------------------------===// - -#ifndef SYSTEMUTILS_H -#define SYSTEMUTILS_H - -#include - -namespace llvm { - -/// isExecutableFile - This function returns true if the filename specified -/// exists and is executable. -/// -bool isExecutableFile(const std::string &ExeFileName); - -/// isStandardOutAConsole - Return true if we can tell that the standard output -/// stream goes to a terminal window or console. -bool isStandardOutAConsole(); - -/// FindExecutable - Find a named executable, giving the argv[0] of program -/// being executed. This allows us to find another LLVM tool if it is built into -/// the same directory, but that directory is neither the current directory, nor -/// in the PATH. If the executable cannot be found, return an empty string. -/// -std::string FindExecutable(const std::string &ExeName, - const std::string &ProgramPath); - -/// RunProgramWithTimeout - This function executes the specified program, with -/// the specified null-terminated argument array, with the stdin/out/err fd's -/// redirected, with a timeout specified by the last argument. This terminates -/// the calling program if there is an error executing the specified program. -/// It returns the return value of the program, or -1 if a timeout is detected. -/// -int RunProgramWithTimeout(const std::string &ProgramPath, const char **Args, - const std::string &StdInFile = "", - const std::string &StdOutFile = "", - const std::string &StdErrFile = "", - unsigned NumSeconds = 0); - -/// ExecWait - Execute a program with the given arguments and environment and -/// wait for it to terminate. -/// -int ExecWait (const char * const argv[], const char * const envp[]); - -/// AllocateRWXMemory - Allocate a slab of memory with read/write/execute -/// permissions. This is typically used for JIT applications where we want -/// to emit code to the memory then jump to it. Getting this type of memory -/// is very OS specific. -/// -void *AllocateRWXMemory(unsigned NumBytes); - -} // End llvm namespace - -#endif diff --git a/include/Support/ThreadSupport-NoSupport.h b/include/Support/ThreadSupport-NoSupport.h deleted file mode 100644 index 5dc954efab1..00000000000 --- a/include/Support/ThreadSupport-NoSupport.h +++ /dev/null @@ -1,34 +0,0 @@ -//===-- Support/ThreadSupport-NoSupport.h - Generic impl --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines a generic ThreadSupport implementation used when there is -// no supported threading mechanism on the current system. Users should never -// #include this file directly! -// -//===----------------------------------------------------------------------===// - -// Users should never #include this file directly! As such, no include guards -// are needed. - -#ifndef SUPPORT_THREADSUPPORT_H -#error "Code should not #include Support/ThreadSupport-NoSupport.h directly!" -#endif - -namespace llvm { - /// Mutex - This class allows user code to protect variables shared between - /// threads. It implements a "recursive" mutex, to simplify user code. - /// - /// Since there is no platform support for _creating threads_, the non-thread - /// implementation of this class is a noop. - /// - struct Mutex { - void acquire () {} - void release () {} - }; -} diff --git a/include/Support/ThreadSupport-PThreads.h b/include/Support/ThreadSupport-PThreads.h deleted file mode 100644 index 6bbe682c089..00000000000 --- a/include/Support/ThreadSupport-PThreads.h +++ /dev/null @@ -1,42 +0,0 @@ -//===-- Support/ThreadSupport-PThreads.h - PThreads support -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines pthreads implementations of the generic threading -// mechanisms. Users should never #include this file directly! -// -//===----------------------------------------------------------------------===// - -// Users should never #include this file directly! As such, no include guards -// are needed. - -#ifndef SUPPORT_THREADSUPPORT_H -#error "Code should not #include Support/ThreadSupport/PThreads.h directly!" -#endif - -#include - -namespace llvm { - - /// Mutex - This class allows user code to protect variables shared between - /// threads. It implements a "recursive" mutex, to simplify user code. - /// - class Mutex { - pthread_mutex_t mutex; - Mutex(const Mutex &); // DO NOT IMPLEMENT - void operator=(const Mutex &); // DO NOT IMPLEMENT - public: - Mutex() { - pthread_mutexattr_t Attr; - pthread_mutex_init(&mutex, &Attr); - } - ~Mutex() { pthread_mutex_destroy(&mutex); } - void acquire () { pthread_mutex_lock (&mutex); } - void release () { pthread_mutex_unlock (&mutex); } - }; -} // end namespace llvm diff --git a/include/Support/ThreadSupport.h.in b/include/Support/ThreadSupport.h.in deleted file mode 100644 index 470010219fc..00000000000 --- a/include/Support/ThreadSupport.h.in +++ /dev/null @@ -1,40 +0,0 @@ -//===-- Support/ThreadSupport.h - Generic threading support -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines platform-agnostic interfaces that can be used to write -// multi-threaded programs. Autoconf is used to chose the correct -// implementation of these interfaces, or default to a non-thread-capable system -// if no matching system support is available. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_THREADSUPPORT_H -#define SUPPORT_THREADSUPPORT_H - -#if @HAVE_PTHREAD_MUTEX_LOCK@ -#include "Support/ThreadSupport-PThreads.h" -#else -#include "Support/ThreadSupport-NoSupport.h" -#endif // If no system support is available - -namespace llvm { - /// MutexLocker - Instances of this class acquire a given Lock when - /// constructed and hold that lock until destruction. - /// - class MutexLocker { - Mutex &M; - MutexLocker(const MutexLocker &); // DO NOT IMPLEMENT - void operator=(const MutexLocker &); // DO NOT IMPLEMENT - public: - MutexLocker(Mutex &m) : M(m) { M.acquire(); } - ~MutexLocker() { M.release(); } - }; -} - -#endif // SUPPORT_THREADSUPPORT_H diff --git a/include/Support/Timer.h b/include/Support/Timer.h deleted file mode 100644 index ac465bb95b2..00000000000 --- a/include/Support/Timer.h +++ /dev/null @@ -1,164 +0,0 @@ -//===-- Support/Timer.h - Interval Timing Support ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines three classes: Timer, TimeRegion, and TimerGroup, -// documented below. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_TIMER_H -#define SUPPORT_TIMER_H - -#include -#include -#include -#include - -namespace llvm { - -class TimerGroup; - -/// Timer - This class is used to track the amount of time spent between -/// invocations of it's startTimer()/stopTimer() methods. Given appropriate OS -/// support it can also keep track of the RSS of the program at various points. -/// By default, the Timer will print the amount of time it has captured to -/// standard error when the laster timer is destroyed, otherwise it is printed -/// when it's TimerGroup is destroyed. Timer's do not print their information -/// if they are never started. -/// -class Timer { - double Elapsed; // Wall clock time elapsed in seconds - double UserTime; // User time elapsed - double SystemTime; // System time elapsed - long MemUsed; // Memory allocated (in bytes) - long PeakMem; // Peak memory used - long PeakMemBase; // Temporary for peak calculation... - std::string Name; // The name of this time variable - bool Started; // Has this time variable ever been started? - TimerGroup *TG; // The TimerGroup this Timer is in. -public: - Timer(const std::string &N); - Timer(const std::string &N, TimerGroup &tg); - Timer(const Timer &T); - ~Timer(); - - double getProcessTime() const { return UserTime+SystemTime; } - double getWallTime() const { return Elapsed; } - long getMemUsed() const { return MemUsed; } - long getPeakMem() const { return PeakMem; } - std::string getName() const { return Name; } - - const Timer &operator=(const Timer &T) { - Elapsed = T.Elapsed; - UserTime = T.UserTime; - SystemTime = T.SystemTime; - MemUsed = T.MemUsed; - PeakMem = T.PeakMem; - PeakMemBase = T.PeakMemBase; - Name = T.Name; - Started = T.Started; - assert(TG == T.TG && "Can only assign timers in the same TimerGroup!"); - return *this; - } - - // operator< - Allow sorting... - bool operator<(const Timer &T) const { - // Sort by Wall Time elapsed, as it is the only thing really accurate - return Elapsed < T.Elapsed; - } - bool operator>(const Timer &T) const { return T.operator<(*this); } - - /// startTimer - Start the timer running. Time between calls to - /// startTimer/stopTimer is counted by the Timer class. Note that these calls - /// must be correctly paired. - /// - void startTimer(); - - /// stopTimer - Stop the timer. - /// - void stopTimer(); - - /// addPeakMemoryMeasurement - This method should be called whenever memory - /// usage needs to be checked. It adds a peak memory measurement to the - /// currently active timers, which will be printed when the timer group prints - /// - static void addPeakMemoryMeasurement(); - - /// print - Print the current timer to standard error, and reset the "Started" - /// flag. - void print(const Timer &Total, std::ostream &OS); - -private: - friend class TimerGroup; - - // Copy ctor, initialize with no TG member. - Timer(bool, const Timer &T); - - /// sum - Add the time accumulated in the specified timer into this timer. - /// - void sum(const Timer &T); -}; - - -/// The TimeRegion class is used as a helper class to call the startTimer() and -/// stopTimer() methods of the Timer class. When the object is constructed, it -/// starts the timer specified as it's argument. When it is destroyed, it stops -/// the relevant timer. This makes it easy to time a region of code. -/// -class TimeRegion { - Timer &T; - TimeRegion(const TimeRegion &); // DO NOT IMPLEMENT -public: - TimeRegion(Timer &t) : T(t) { - T.startTimer(); - } - ~TimeRegion() { - T.stopTimer(); - } -}; - - -/// NamedRegionTimer - This class is basically a combination of TimeRegion and -/// Timer. It allows you to declare a new timer, AND specify the region to -/// time, all in one statement. All timers with the same name are merged. This -/// is primarily used for debugging and for hunting performance problems. -/// -struct NamedRegionTimer : public TimeRegion { - NamedRegionTimer(const std::string &Name); -}; - - -/// The TimerGroup class is used to group together related timers into a single -/// report that is printed when the TimerGroup is destroyed. It is illegal to -/// destroy a TimerGroup object before all of the Timers in it are gone. A -/// TimerGroup can be specified for a newly created timer in its constructor. -/// -class TimerGroup { - std::string Name; - unsigned NumTimers; - std::vector TimersToPrint; -public: - TimerGroup(const std::string &name) : Name(name), NumTimers(0) {} - ~TimerGroup() { - assert(NumTimers == 0 && - "TimerGroup destroyed before all contained timers!"); - } - -private: - friend class Timer; - void addTimer() { ++NumTimers; } - void removeTimer(); - void addTimerToPrint(const Timer &T) { - TimersToPrint.push_back(Timer(true, T)); - } -}; - -} // End llvm namespace - -#endif diff --git a/include/Support/Tree.h b/include/Support/Tree.h deleted file mode 100644 index 48ecf5b06dc..00000000000 --- a/include/Support/Tree.h +++ /dev/null @@ -1,62 +0,0 @@ -//===- Support/Tree.h - Generic n-way tree structure ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This class defines a generic N way tree node structure. The tree structure -// is immutable after creation, but the payload contained within it is not. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_TREE_H -#define SUPPORT_TREE_H - -#include - -namespace llvm { - -template -class Tree { - std::vector Children; // This nodes children, if any - ConcreteTreeNode *Parent; // Parent of this node... - Payload Data; // Data held in this node... - -protected: - void setChildren(const std::vector &children) { - Children = children; - } -public: - inline Tree(ConcreteTreeNode *parent) : Parent(parent) {} - inline Tree(const std::vector &children, - ConcreteTreeNode *par) : Children(children), Parent(par) {} - - inline Tree(const std::vector &children, - ConcreteTreeNode *par, const Payload &data) - : Children(children), Parent(par), Data(data) {} - - // Tree dtor - Free all children - inline ~Tree() { - for (unsigned i = Children.size(); i > 0; --i) - delete Children[i-1]; - } - - // Tree manipulation/walking routines... - inline ConcreteTreeNode *getParent() const { return Parent; } - inline unsigned getNumChildren() const { return Children.size(); } - inline ConcreteTreeNode *getChild(unsigned i) const { - assert(i < Children.size() && "Tree::getChild with index out of range!"); - return Children[i]; - } - - // Payload access... - inline Payload &getTreeData() { return Data; } - inline const Payload &getTreeData() const { return Data; } -}; - -} // End llvm namespace - -#endif diff --git a/include/Support/TypeInfo.h b/include/Support/TypeInfo.h deleted file mode 100644 index e23f906afa7..00000000000 --- a/include/Support/TypeInfo.h +++ /dev/null @@ -1,76 +0,0 @@ -//===- Support/TypeInfo.h - Support class for type_info objects -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This class makes std::type_info objects behave like first class objects that -// can be put in maps and hashtables. This code is based off of code in the -// Loki C++ library from the Modern C++ Design book. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_TYPEINFO_H -#define SUPPORT_TYPEINFO_H - -#include - -namespace llvm { - -struct TypeInfo { - TypeInfo() { // needed for containers - struct Nil {}; // Anonymous class distinct from all others... - Info = &typeid(Nil); - } - - TypeInfo(const std::type_info &ti) : Info(&ti) { // non-explicit - } - - // Access for the wrapped std::type_info - const std::type_info &get() const { - return *Info; - } - - // Compatibility functions - bool before(const TypeInfo &rhs) const { - return Info->before(*rhs.Info) != 0; - } - const char *getClassName() const { - return Info->name(); - } - -private: - const std::type_info *Info; -}; - -// Comparison operators -inline bool operator==(const TypeInfo &lhs, const TypeInfo &rhs) { - return lhs.get() == rhs.get(); -} - -inline bool operator<(const TypeInfo &lhs, const TypeInfo &rhs) { - return lhs.before(rhs); -} - -inline bool operator!=(const TypeInfo &lhs, const TypeInfo &rhs) { - return !(lhs == rhs); -} - -inline bool operator>(const TypeInfo &lhs, const TypeInfo &rhs) { - return rhs < lhs; -} - -inline bool operator<=(const TypeInfo &lhs, const TypeInfo &rhs) { - return !(lhs > rhs); -} - -inline bool operator>=(const TypeInfo &lhs, const TypeInfo &rhs) { - return !(lhs < rhs); -} - -} // End llvm namespace - -#endif diff --git a/include/Support/VectorExtras.h b/include/Support/VectorExtras.h deleted file mode 100644 index cf7cf5d2ebb..00000000000 --- a/include/Support/VectorExtras.h +++ /dev/null @@ -1,40 +0,0 @@ -//===-- VectorExtras.h - Helper functions for std::vector -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains helper functions which are useful for working with the -// std::vector class. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_VECTOREXTRAS_H -#define SUPPORT_VECTOREXTRAS_H - -#include - -namespace llvm { - -/// make_vector - Helper function which is useful for building temporary vectors -/// to pass into type construction of CallInst ctors. This turns a null -/// terminated list of pointers (or other value types) into a real live vector. -/// -template -inline std::vector make_vector(T A, ...) { - va_list Args; - va_start(Args, A); - std::vector Result; - Result.push_back(A); - while (T Val = va_arg(Args, T)) - Result.push_back(Val); - va_end(Args); - return Result; -} - -} // End llvm namespace - -#endif diff --git a/include/Support/hash_map.in b/include/Support/hash_map.in deleted file mode 100644 index 0253de788fe..00000000000 --- a/include/Support/hash_map.in +++ /dev/null @@ -1,66 +0,0 @@ -//===-- Support/hash_map - "Portable" wrapper around hash_map ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file provides a wrapper around the mysterious header file -// that seems to move around between GCC releases into and out of namespaces at -// will. #including this header will cause hash_map to be available in the -// global namespace. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_HASH_MAP -#define SUPPORT_HASH_MAP - -// Compiler Support Matrix -// -// Version Namespace Header File -// 2.95.x :: hash_map -// 3.0.4 std ext/hash_map -// 3.1 __gnu_cxx ext/hash_map -// - -#if @HAVE_GNU_EXT_HASH_MAP@ -// This is for GCC-3.1+ which puts hash in ext/hash_map -# include -# ifndef HASH_NAMESPACE -# define HASH_NAMESPACE __gnu_cxx -# endif - -// GCC 3.0.x puts hash_map in and in the std namespace. -#elif @HAVE_STD_EXT_HASH_MAP@ -# include -# ifndef HASH_NAMESPACE -# define HASH_NAMESPACE std -# endif - -// Older compilers such as GCC before version 3.0 do not keep -// extensions in the `ext' directory, and ignore the `std' namespace. -#elif @HAVE_GLOBAL_HASH_MAP@ -# include -# ifndef HASH_NAMESPACE -# define HASH_NAMESPACE std -# endif - -// Give a warning if we couldn't find it, instead of (or in addition to) -// randomly doing something dumb. -#else -# warning "Autoconfiguration failed to find the hash_map header file." -#endif - -using HASH_NAMESPACE::hash_map; -using HASH_NAMESPACE::hash_multimap; -using HASH_NAMESPACE::hash; - -// Include vector because ext/hash_map includes stl_vector.h and leaves -// out specializations like stl_bvector.h, causing link conflicts. -#include - -#include - -#endif diff --git a/include/Support/hash_set.in b/include/Support/hash_set.in deleted file mode 100644 index 49c5d732e8f..00000000000 --- a/include/Support/hash_set.in +++ /dev/null @@ -1,67 +0,0 @@ -//===-- Support/hash_set - "Portable" wrapper around hash_set ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// vim:ft=cpp -// -// This file provides a wrapper around the mysterious header file -// that seems to move around between GCC releases into and out of namespaces at -// will. #including this header will cause hash_set to be available in the -// global namespace. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_HASH_SET -#define SUPPORT_HASH_SET - -// Compiler Support Matrix -// -// Version Namespace Header File -// 2.95.x :: hash_set -// 3.0.4 std ext/hash_set -// 3.1 __gnu_cxx ext/hash_set -// - -// GCC versions 3.1 and later put hash_set in and in -// the __gnu_cxx namespace. -#if @HAVE_GNU_EXT_HASH_SET@ -# include -# ifndef HASH_NAMESPACE -# define HASH_NAMESPACE __gnu_cxx -# endif - -// GCC 3.0.x puts hash_set in and in the std namespace. -#elif @HAVE_STD_EXT_HASH_SET@ -# include -# ifndef HASH_NAMESPACE -# define HASH_NAMESPACE std -# endif - -// Older compilers such as GCC before version 3.0 do not keep -// extensions in the `ext' directory, and ignore the `std' namespace. -#elif @HAVE_GLOBAL_HASH_SET@ -# include -# ifndef HASH_NAMESPACE -# define HASH_NAMESPACE std -# endif - -// Give a warning if we couldn't find it, instead of (or in addition to) -// randomly doing something dumb. -#else -# warning "Autoconfiguration failed to find the hash_set header file." -#endif - -using HASH_NAMESPACE::hash_set; -using HASH_NAMESPACE::hash; - -// Include vector because ext/hash_set includes stl_vector.h and leaves -// out specializations like stl_bvector.h, causing link conflicts. -#include - -#include - -#endif diff --git a/include/Support/ilist b/include/Support/ilist deleted file mode 100644 index 9d9fdf0fdb8..00000000000 --- a/include/Support/ilist +++ /dev/null @@ -1,638 +0,0 @@ -//===-- Support/ilist - Intrusive Linked List Template ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines classes to implement an intrusive doubly linked list class -// (ie each node of the list must contain a next and previous field for the -// list. -// -// The ilist_traits trait class is used to gain access to the next and previous -// fields of the node type that the list is instantiated with. If it is not -// specialized, the list defaults to using the getPrev(), getNext() method calls -// to get the next and previous pointers. -// -// The ilist class itself, should be a plug in replacement for list, assuming -// that the nodes contain next/prev pointers. This list replacement does not -// provides a constant time size() method, so be careful to use empty() when you -// really want to know if it's empty. -// -// The ilist class is implemented by allocating a 'tail' node when the list is -// created (using ilist_traits<>::createEndMarker()). This tail node is -// absolutely required because the user must be able to compute end()-1. Because -// of this, users of the direct next/prev links will see an extra link on the -// end of the list, which should be ignored. -// -// Requirements for a user of this list: -// -// 1. The user must provide {g|s}et{Next|Prev} methods, or specialize -// ilist_traits to provide an alternate way of getting and setting next and -// prev links. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_ILIST -#define SUPPORT_ILIST - -#include -#include - -namespace llvm { - -template class iplist; -template class ilist_iterator; - -// Template traits for intrusive list. By specializing this template class, you -// can change what next/prev fields are used to store the links... -template -struct ilist_traits { - static NodeTy *getPrev(NodeTy *N) { return N->getPrev(); } - static NodeTy *getNext(NodeTy *N) { return N->getNext(); } - static const NodeTy *getPrev(const NodeTy *N) { return N->getPrev(); } - static const NodeTy *getNext(const NodeTy *N) { return N->getNext(); } - - static void setPrev(NodeTy *N, NodeTy *Prev) { N->setPrev(Prev); } - static void setNext(NodeTy *N, NodeTy *Next) { N->setNext(Next); } - - static NodeTy *createNode() { return new NodeTy(); } - static NodeTy *createNode(const NodeTy &V) { return new NodeTy(V); } - - - void addNodeToList(NodeTy *NTy) {} - void removeNodeFromList(NodeTy *NTy) {} - void transferNodesFromList(iplist &L2, - ilist_iterator first, - ilist_iterator last) {} -}; - -// Const traits are the same as nonconst traits... -template -struct ilist_traits : public ilist_traits {}; - - -//===----------------------------------------------------------------------===// -// ilist_iterator - Iterator for intrusive list. -// -template -class ilist_iterator - : public bidirectional_iterator { - typedef ilist_traits Traits; - typedef bidirectional_iterator super; - -public: - typedef size_t size_type; - typedef typename super::pointer pointer; - typedef typename super::reference reference; -private: - pointer NodePtr; -public: - - ilist_iterator(pointer NP) : NodePtr(NP) {} - ilist_iterator(reference NR) : NodePtr(&NR) {} - ilist_iterator() : NodePtr(0) {} - - // This is templated so that we can allow constructing a const iterator from - // a nonconst iterator... - template - ilist_iterator(const ilist_iterator &RHS) - : NodePtr(RHS.getNodePtrUnchecked()) {} - - // This is templated so that we can allow assigning to a const iterator from - // a nonconst iterator... - template - const ilist_iterator &operator=(const ilist_iterator &RHS) { - NodePtr = RHS.getNodePtrUnchecked(); - return *this; - } - - // Accessors... - operator pointer() const { - assert(Traits::getNext(NodePtr) != 0 && "Dereferencing end()!"); - return NodePtr; - } - - reference operator*() const { - assert(Traits::getNext(NodePtr) != 0 && "Dereferencing end()!"); - return *NodePtr; - } - pointer operator->() { return &operator*(); } - const pointer operator->() const { return &operator*(); } - - // Comparison operators - bool operator==(const ilist_iterator &RHS) const { - return NodePtr == RHS.NodePtr; - } - bool operator!=(const ilist_iterator &RHS) const { - return NodePtr != RHS.NodePtr; - } - - // Increment and decrement operators... - ilist_iterator &operator--() { // predecrement - Back up - NodePtr = Traits::getPrev(NodePtr); - assert(NodePtr && "--'d off the beginning of an ilist!"); - return *this; - } - ilist_iterator &operator++() { // preincrement - Advance - NodePtr = Traits::getNext(NodePtr); - assert(NodePtr && "++'d off the end of an ilist!"); - return *this; - } - ilist_iterator operator--(int) { // postdecrement operators... - ilist_iterator tmp = *this; - --*this; - return tmp; - } - ilist_iterator operator++(int) { // postincrement operators... - ilist_iterator tmp = *this; - ++*this; - return tmp; - } - - // Internal interface, do not use... - pointer getNodePtrUnchecked() const { return NodePtr; } -}; - -// do not implement. this is to catch errors when people try to use -// them as random access iterators -template -void operator-(int, ilist_iterator); -template -void operator-(ilist_iterator,int); - -template -void operator+(int, ilist_iterator); -template -void operator+(ilist_iterator,int); - -//===----------------------------------------------------------------------===// -// ilist_compat_iterator - Compatibility iterator for intrusive list. -// This makes an ilist act like an std::list, where you have to -// dereference stuff multiple times. This should only be used for temporary -// migration purposes. Because we don't support "changing the pointer", we only -// expose constant pointers. -// -template -class ilist_compat_iterator - : public bidirectional_iterator { - typedef ilist_traits Traits; - typedef bidirectional_iterator super; - -public: - typedef size_t size_type; - typedef typename super::pointer pointer; - typedef typename super::reference reference; -private: - NodeTy *NodePtr; -public: - - ilist_compat_iterator(NodeTy *NP) : NodePtr(NP) {} - ilist_compat_iterator() : NodePtr(0) {} - - // This is templated so that we can allow constructing a const iterator from - // a nonconst iterator... - template - ilist_compat_iterator(const ilist_compat_iterator &RHS) - : NodePtr(RHS.getNodePtrUnchecked()) {} - - // This is templated so that we can allow assigning to a const iterator from - // a nonconst iterator... - template - const ilist_compat_iterator &operator=(const - ilist_compat_iterator &RHS) { - NodePtr = RHS.getNodePtrUnchecked(); - return *this; - } - - // Accessors... - operator pointer() const { - assert(Traits::getNext(NodePtr) != 0 && "Dereferencing end()!"); - return &NodePtr; - } - - reference operator*() const { - assert(Traits::getNext(NodePtr) != 0 && "Dereferencing end()!"); - return NodePtr; - } - pointer operator->() { return &operator*(); } - const pointer operator->() const { return &operator*(); } - - // Comparison operators - bool operator==(const ilist_compat_iterator &RHS) const { - return NodePtr == RHS.NodePtr; - } - bool operator!=(const ilist_compat_iterator &RHS) const { - return NodePtr != RHS.NodePtr; - } - - // Increment and decrement operators... - ilist_compat_iterator &operator--() { // predecrement - Back up - NodePtr = Traits::getPrev(NodePtr); - assert(NodePtr && "--'d off the beginning of an ilist!"); - return *this; - } - ilist_compat_iterator &operator++() { // preincrement - Advance - NodePtr = Traits::getNext(NodePtr); - assert(NodePtr && "++'d off the end of an ilist!"); - return *this; - } - ilist_compat_iterator operator--(int) { // postdecrement operators... - ilist_compat_iterator tmp = *this; - --*this; - return tmp; - } - ilist_compat_iterator operator++(int) { // postincrement operators... - ilist_compat_iterator tmp = *this; - ++*this; - return tmp; - } - - // Internal interface, do not use... - pointer getNodePtrUnchecked() const { return NodePtr; } -}; - - -// Allow ilist_iterators to convert into pointers to a node automatically when -// used by the dyn_cast, cast, isa mechanisms... - -template struct simplify_type; - -template struct simplify_type > { - typedef NodeTy* SimpleType; - - static SimpleType getSimplifiedValue(const ilist_iterator &Node) { - return &*Node; - } -}; -template struct simplify_type > { - typedef NodeTy* SimpleType; - - static SimpleType getSimplifiedValue(const ilist_iterator &Node) { - return &*Node; - } -}; - - -//===----------------------------------------------------------------------===// -// -// iplist - The subset of list functionality that can safely be used on nodes of -// polymorphic types, ie a heterogeneus list with a common base class that holds -// the next/prev pointers... -// -template > -class iplist : public Traits { - NodeTy *Head, *Tail; - - static bool op_less(NodeTy &L, NodeTy &R) { return L < R; } - static bool op_equal(NodeTy &L, NodeTy &R) { return L == R; } -public: - typedef NodeTy *pointer; - typedef const NodeTy *const_pointer; - typedef NodeTy &reference; - typedef const NodeTy &const_reference; - typedef NodeTy value_type; - typedef ilist_iterator iterator; - typedef ilist_iterator const_iterator; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef std::reverse_iterator const_reverse_iterator; - typedef std::reverse_iterator reverse_iterator; - - iplist() : Head(Traits::createNode()), Tail(Head) { - setNext(Head, 0); - setPrev(Head, 0); - } - ~iplist() { clear(); delete Tail; } - - // Iterator creation methods. - iterator begin() { return iterator(Head); } - const_iterator begin() const { return const_iterator(Head); } - iterator end() { return iterator(Tail); } - const_iterator end() const { return const_iterator(Tail); } - - // reverse iterator creation methods. - reverse_iterator rbegin() { return reverse_iterator(end()); } - const_reverse_iterator rbegin() const{ return const_reverse_iterator(end()); } - reverse_iterator rend() { return reverse_iterator(begin()); } - const_reverse_iterator rend() const {return const_reverse_iterator(begin());} - - - // "compatibility" iterator creation methods. - typedef ilist_compat_iterator compat_iterator; - compat_iterator compat_begin() const { return compat_iterator(Head); } - compat_iterator compat_end() const { return compat_iterator(Tail); } - - // Miscellaneous inspection routines. - size_type max_size() const { return size_type(-1); } - bool empty() const { return Head == Tail; } - - // Front and back accessor functions... - reference front() { - assert(!empty() && "Called front() on empty list!"); - return *Head; - } - const_reference front() const { - assert(!empty() && "Called front() on empty list!"); - return *Head; - } - reference back() { - assert(!empty() && "Called back() on empty list!"); - return *getPrev(Tail); - } - const_reference back() const { - assert(!empty() && "Called back() on empty list!"); - return *getPrev(Tail); - } - - void swap(iplist &RHS) { - abort(); // Swap does not use list traits callback correctly yet! - std::swap(Head, RHS.Head); - std::swap(Tail, RHS.Tail); - } - - iterator insert(iterator where, NodeTy *New) { - NodeTy *CurNode = where.getNodePtrUnchecked(), *PrevNode = getPrev(CurNode); - setNext(New, CurNode); - setPrev(New, PrevNode); - - if (PrevNode) - setNext(PrevNode, New); - else - Head = New; - setPrev(CurNode, New); - - addNodeToList(New); // Notify traits that we added a node... - return New; - } - - NodeTy *remove(iterator &IT) { - assert(IT != end() && "Cannot remove end of list!"); - NodeTy *Node = &*IT; - NodeTy *NextNode = getNext(Node); - NodeTy *PrevNode = getPrev(Node); - - if (PrevNode) - setNext(PrevNode, NextNode); - else - Head = NextNode; - setPrev(NextNode, PrevNode); - IT = NextNode; - removeNodeFromList(Node); // Notify traits that we removed a node... - return Node; - } - - NodeTy *remove(const iterator &IT) { - iterator MutIt = IT; - return remove(MutIt); - } - - // erase - remove a node from the controlled sequence... and delete it. - iterator erase(iterator where) { - delete remove(where); - return where; - } - - -private: - // transfer - The heart of the splice function. Move linked list nodes from - // [first, last) into position. - // - void transfer(iterator position, iplist &L2, iterator first, iterator last) { - assert(first != last && "Should be checked by callers"); - if (position != last) { - // Remove [first, last) from its old position. - NodeTy *First = &*first, *Prev = getPrev(First); - NodeTy *Next = last.getNodePtrUnchecked(), *Last = getPrev(Next); - if (Prev) - setNext(Prev, Next); - else - L2.Head = Next; - setPrev(Next, Prev); - - // Splice [first, last) into its new position. - NodeTy *PosNext = position.getNodePtrUnchecked(); - NodeTy *PosPrev = getPrev(PosNext); - - // Fix head of list... - if (PosPrev) - setNext(PosPrev, First); - else - Head = First; - setPrev(First, PosPrev); - - // Fix end of list... - setNext(Last, PosNext); - setPrev(PosNext, Last); - - transferNodesFromList(L2, First, PosNext); - } - } - -public: - - //===----------------------------------------------------------------------=== - // Functionality derived from other functions defined above... - // - - size_type size() const { -#if __GNUC__ == 2 - // GCC 2.95 has a broken std::distance - size_type Result = 0; - std::distance(begin(), end(), Result); - return Result; -#else - return std::distance(begin(), end()); -#endif - } - - iterator erase(iterator first, iterator last) { - while (first != last) - first = erase(first); - return last; - } - - void clear() { erase(begin(), end()); } - - // Front and back inserters... - void push_front(NodeTy *val) { insert(begin(), val); } - void push_back(NodeTy *val) { insert(end(), val); } - void pop_front() { - assert(!empty() && "pop_front() on empty list!"); - erase(begin()); - } - void pop_back() { - assert(!empty() && "pop_back() on empty list!"); - iterator t = end(); erase(--t); - } - - // Special forms of insert... - template void insert(iterator where, InIt first, InIt last) { - for (; first != last; ++first) insert(where, *first); - } - - // Splice members - defined in terms of transfer... - void splice(iterator where, iplist &L2) { - if (!L2.empty()) - transfer(where, L2, L2.begin(), L2.end()); - } - void splice(iterator where, iplist &L2, iterator first) { - iterator last = first; ++last; - if (where == first || where == last) return; // No change - transfer(where, L2, first, last); - } - void splice(iterator where, iplist &L2, iterator first, iterator last) { - if (first != last) transfer(where, L2, first, last); - } - - - - //===----------------------------------------------------------------------=== - // High-Level Functionality that shouldn't really be here, but is part of list - // - - // These two functions are actually called remove/remove_if in list<>, but - // they actually do the job of erase, rename them accordingly. - // - void erase(const NodeTy &val) { - for (iterator I = begin(), E = end(); I != E; ) { - iterator next = I; ++next; - if (*I == val) erase(I); - I = next; - } - } - template void erase_if(Pr1 pred) { - for (iterator I = begin(), E = end(); I != E; ) { - iterator next = I; ++next; - if (pred(*I)) erase(I); - I = next; - } - } - - template void unique(Pr2 pred) { - if (empty()) return; - for (iterator I = begin(), E = end(), Next = begin(); ++Next != E;) { - if (pred(*I)) - erase(Next); - else - I = Next; - Next = I; - } - } - void unique() { unique(op_equal); } - - template void merge(iplist &right, Pr3 pred) { - iterator first1 = begin(), last1 = end(); - iterator first2 = right.begin(), last2 = right.end(); - while (first1 != last1 && first2 != last2) - if (pred(*first2, *first1)) { - iterator next = first2; - transfer(first1, right, first2, ++next); - first2 = next; - } else { - ++first1; - } - if (first2 != last2) transfer(last1, right, first2, last2); - } - void merge(iplist &right) { return merge(right, op_less); } - - template void sort(Pr3 pred); - void sort() { sort(op_less); } - void reverse(); -}; - - -template -struct ilist : public iplist { - typedef typename iplist::size_type size_type; - typedef typename iplist::iterator iterator; - - ilist() {} - ilist(const ilist &right) { - insert(this->begin(), right.begin(), right.end()); - } - explicit ilist(size_type count) { - insert(this->begin(), count, NodeTy()); - } - ilist(size_type count, const NodeTy &val) { - insert(this->begin(), count, val); - } - template ilist(InIt first, InIt last) { - insert(this->begin(), first, last); - } - - - // Forwarding functions: A workaround for GCC 2.95 which does not correctly - // support 'using' declarations to bring a hidden member into scope. - // - iterator insert(iterator a, NodeTy *b){ return iplist::insert(a, b); } - void push_front(NodeTy *a) { iplist::push_front(a); } - void push_back(NodeTy *a) { iplist::push_back(a); } - - - // Main implementation here - Insert for a node passed by value... - iterator insert(iterator where, const NodeTy &val) { - return insert(where, createNode(val)); - } - - - // Front and back inserters... - void push_front(const NodeTy &val) { insert(this->begin(), val); } - void push_back(const NodeTy &val) { insert(this->end(), val); } - - // Special forms of insert... - template void insert(iterator where, InIt first, InIt last) { - for (; first != last; ++first) insert(where, *first); - } - void insert(iterator where, size_type count, const NodeTy &val) { - for (; count != 0; --count) insert(where, val); - } - - // Assign special forms... - void assign(size_type count, const NodeTy &val) { - iterator I = this->begin(); - for (; I != this->end() && count != 0; ++I, --count) - *I = val; - if (count != 0) - insert(this->end(), val, val); - else - erase(I, this->end()); - } - template void assign(InIt first1, InIt last1) { - iterator first2 = this->begin(), last2 = this->end(); - for ( ; first1 != last1 && first2 != last2; ++first1, ++first2) - *first1 = *first2; - if (first2 == last2) - erase(first1, last1); - else - insert(last1, first2, last2); - } - - - // Resize members... - void resize(size_type newsize, NodeTy val) { - iterator i = this->begin(); - size_type len = 0; - for ( ; i != this->end() && len < newsize; ++i, ++len) /* empty*/ ; - - if (len == newsize) - erase(i, this->end()); - else // i == end() - insert(this->end(), newsize - len, val); - } - void resize(size_type newsize) { resize(newsize, NodeTy()); } -}; - -} // End llvm namespace - -namespace std { - // Ensure that swap uses the fast list swap... - template - void swap(llvm::iplist &Left, llvm::iplist &Right) { - Left.swap(Right); - } -} // End 'std' extensions... - -#endif diff --git a/include/Support/iterator.in b/include/Support/iterator.in deleted file mode 100644 index 93813e19859..00000000000 --- a/include/Support/iterator.in +++ /dev/null @@ -1,66 +0,0 @@ -//===-- Support/iterator - "Portable" wrapper around -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file provides a wrapper around the mysterious header file. -// In GCC 2.95.3, the file defines a bidirectional_iterator class (and other -// friends), instead of the standard iterator class. In GCC 3.1, the -// bidirectional_iterator class got moved out and the new, standards compliant, -// iterator<> class was added. Because there is nothing that we can do to get -// correct behavior on both compilers, we have this header with #ifdef's. Gross -// huh? -// -// By #includ'ing this file, you get the contents of plus the -// following classes in the global namespace: -// -// 1. bidirectional_iterator -// 2. forward_iterator -// -// The #if directives' expressions are filled in by Autoconf. -// -//===----------------------------------------------------------------------===// - -#ifndef SUPPORT_ITERATOR -#define SUPPORT_ITERATOR - -#include - -#if !@HAVE_BI_ITERATOR@ -# if @HAVE_STD_ITERATOR@ -/// If the bidirectional iterator is not defined, we attempt to define it in -/// terms of the C++ standard iterator. Otherwise, we import it with a "using" -/// statement. -/// -template -struct bidirectional_iterator - : public std::iterator { -}; -# else -# error "Need to have standard iterator to define bidirectional iterator!" -# endif -#else -using std::bidirectional_iterator; -#endif - -#if !@HAVE_FWD_ITERATOR@ -# if @HAVE_STD_ITERATOR@ -/// If the forward iterator is not defined, attempt to define it in terms of -/// the C++ standard iterator. Otherwise, we import it with a "using" statement. -/// -template -struct forward_iterator - : public std::iterator { -}; -# else -# error "Need to have standard iterator to define forward iterator!" -# endif -#else -using std::forward_iterator; -#endif - -#endif diff --git a/include/Support/type_traits.h b/include/Support/type_traits.h deleted file mode 100644 index de932b28db8..00000000000 --- a/include/Support/type_traits.h +++ /dev/null @@ -1,54 +0,0 @@ -//===- Support/type_traits.h - Simplfied type traits ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file provides a template class that determines if a type is a class or -// not. The basic mechanism, based on using the pointer to member function of -// a zero argument to a function was "boosted" from the boost type_traits -// library. See http://www.boost.org/ for all the gory details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_SUPPORT_TYPE_TRAITS_H -#define LLVM_SUPPORT_TYPE_TRAITS_H - -// This is actually the conforming implementation which works with abstract -// classes. However, enough compilers have trouble with it that most will use -// the one in boost/type_traits/object_traits.hpp. This implementation actually -// works with VC7.0, but other interactions seem to fail when we use it. - -namespace llvm { - -namespace dont_use -{ - // These two functions should never be used. They are helpers to - // the is_class template below. They cannot be located inside - // is_class because doing so causes at least GCC to think that - // the value of the "value" enumerator is not constant. Placing - // them out here (for some strange reason) allows the sizeof - // operator against them to magically be constant. This is - // important to make the is_class::value idiom zero cost. it - // evaluates to a constant 1 or 0 depending on whether the - // parameter T is a class or not (respectively). - template char is_class_helper(void(T::*)(void)); - template double is_class_helper(...); -} - -template -struct is_class -{ - // is_class<> metafunction due to Paul Mensonides (leavings@attbi.com). For - // more details: - // http://groups.google.com/groups?hl=en&selm=000001c1cc83%24e154d5e0%247772e50c%40c161550a&rnum=1 - public: - enum { value = sizeof(char) == sizeof(dont_use::is_class_helper(0)) }; -}; - -} - -#endif diff --git a/include/llvm/ADT/BitSetVector.h b/include/llvm/ADT/BitSetVector.h index 276af0a68a6..73c5841ad6e 100644 --- a/include/llvm/ADT/BitSetVector.h +++ b/include/llvm/ADT/BitSetVector.h @@ -1,4 +1,4 @@ -//===-- BitVectorSet.h - A bit-vector representation of sets ----*- C++ -*-===// +//===-- llvm/ADT/BitVectorSet.h - A bit-vector rep. of sets -----*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -22,8 +22,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_BITSETVECTOR_H -#define SUPPORT_BITSETVECTOR_H +#ifndef LLVM_ADT_BITSETVECTOR_H +#define LLVM_ADT_BITSETVECTOR_H #include #include diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h index 4f6dc91bb63..c141a6c6f46 100644 --- a/include/llvm/ADT/DenseMap.h +++ b/include/llvm/ADT/DenseMap.h @@ -1,4 +1,4 @@ -//===- DenseMap.h - A dense map implmentation -------------------*- C++ -*-===// +//===- llvm/ADT/DenseMap.h - A dense map implmentation ----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -17,8 +17,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_DENSEMAP_H -#define SUPPORT_DENSEMAP_H +#ifndef LLVM_ADT_DENSEMAP_H +#define LLVM_ADT_DENSEMAP_H #include diff --git a/include/llvm/ADT/DepthFirstIterator.h b/include/llvm/ADT/DepthFirstIterator.h index c465f4e549e..d18ca9d582c 100644 --- a/include/llvm/ADT/DepthFirstIterator.h +++ b/include/llvm/ADT/DepthFirstIterator.h @@ -1,4 +1,4 @@ -//===- Support/DepthFirstIterator.h - Depth First iterator ------*- C++ -*-===// +//===- llvm/ADT/DepthFirstIterator.h - Depth First iterator -----*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// // -// This file builds on the Support/GraphTraits.h file to build generic depth +// This file builds on the ADT/GraphTraits.h file to build generic depth // first graph iterator. This file exposes the following functions/types: // // df_begin/df_end/df_iterator @@ -30,11 +30,11 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_DEPTHFIRSTITERATOR_H -#define SUPPORT_DEPTHFIRSTITERATOR_H +#ifndef LLVM_ADT_DEPTHFIRSTITERATOR_H +#define LLVM_ADT_DEPTHFIRSTITERATOR_H -#include "Support/GraphTraits.h" -#include "Support/iterator" +#include "llvm/ADT/GraphTraits.h" +#include "llvm/ADT/iterator" #include #include diff --git a/include/llvm/ADT/EquivalenceClasses.h b/include/llvm/ADT/EquivalenceClasses.h index 127183614be..cb4b8bcc32f 100644 --- a/include/llvm/ADT/EquivalenceClasses.h +++ b/include/llvm/ADT/EquivalenceClasses.h @@ -1,4 +1,4 @@ -//===-- Support/EquivalenceClasses.h ----------------------------*- C++ -*-===// +//===-- llvm/ADT/EquivalenceClasses.h - Generic Equiv. Classes --*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -14,8 +14,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_EQUIVALENCECLASSES_H -#define SUPPORT_EQUIVALENCECLASSES_H +#ifndef LLVM_ADT_EQUIVALENCECLASSES_H +#define LLVM_ADT_EQUIVALENCECLASSES_H #include #include diff --git a/include/llvm/ADT/GraphTraits.h b/include/llvm/ADT/GraphTraits.h index 4ff74176a7a..e5765bb713b 100644 --- a/include/llvm/ADT/GraphTraits.h +++ b/include/llvm/ADT/GraphTraits.h @@ -1,4 +1,4 @@ -//===-- Support/GraphTraits.h - Graph traits template -----------*- C++ -*-===// +//===-- llvm/ADT/GraphTraits.h - Graph traits template ----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -15,8 +15,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_GRAPHTRAITS_H -#define SUPPORT_GRAPHTRAITS_H +#ifndef LLVM_ADT_GRAPHTRAITS_H +#define LLVM_ADT_GRAPHTRAITS_H namespace llvm { diff --git a/include/llvm/ADT/HashExtras.h b/include/llvm/ADT/HashExtras.h index 67f65b5f3ac..f82115a07c5 100644 --- a/include/llvm/ADT/HashExtras.h +++ b/include/llvm/ADT/HashExtras.h @@ -1,4 +1,4 @@ -//===-- HashExtras.h - Useful functions for STL hash containers -*- C++ -*-===// +//===-- llvm/ADT/HashExtras.h - Useful functions for STL hash ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -14,10 +14,10 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_HASHEXTRAS_H -#define SUPPORT_HASHEXTRAS_H +#ifndef LLVM_ADT_HASHEXTRAS_H +#define LLVM_ADT_HASHEXTRAS_H -#include "Support/hash_map" +#include "llvm/ADT/hash_map" #include // Cannot specialize hash template from outside of the std namespace. diff --git a/include/llvm/ADT/IndexedMap.h b/include/llvm/ADT/IndexedMap.h index 4f6dc91bb63..c141a6c6f46 100644 --- a/include/llvm/ADT/IndexedMap.h +++ b/include/llvm/ADT/IndexedMap.h @@ -1,4 +1,4 @@ -//===- DenseMap.h - A dense map implmentation -------------------*- C++ -*-===// +//===- llvm/ADT/DenseMap.h - A dense map implmentation ----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -17,8 +17,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_DENSEMAP_H -#define SUPPORT_DENSEMAP_H +#ifndef LLVM_ADT_DENSEMAP_H +#define LLVM_ADT_DENSEMAP_H #include diff --git a/include/llvm/ADT/PostOrderIterator.h b/include/llvm/ADT/PostOrderIterator.h index d66c4b84c40..8ae46768b5a 100644 --- a/include/llvm/ADT/PostOrderIterator.h +++ b/include/llvm/ADT/PostOrderIterator.h @@ -1,4 +1,4 @@ -//===- Support/PostOrderIterator.h - Generic PostOrder iterator -*- C++ -*-===// +//===- llvm/ADT/PostOrderIterator.h - PostOrder iterator --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,17 +7,17 @@ // //===----------------------------------------------------------------------===// // -// This file builds on the Support/GraphTraits.h file to build a generic graph +// This file builds on the ADT/GraphTraits.h file to build a generic graph // post order iterator. This should work over any graph type that has a // GraphTraits specialization. // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_POSTORDERITERATOR_H -#define SUPPORT_POSTORDERITERATOR_H +#ifndef LLVM_ADT_POSTORDERITERATOR_H +#define LLVM_ADT_POSTORDERITERATOR_H -#include "Support/GraphTraits.h" -#include "Support/iterator" +#include "llvm/ADT/GraphTraits.h" +#include "llvm/ADT/iterator" #include #include diff --git a/include/llvm/ADT/SCCIterator.h b/include/llvm/ADT/SCCIterator.h index 2ea780ca92d..9cccd123247 100644 --- a/include/llvm/ADT/SCCIterator.h +++ b/include/llvm/ADT/SCCIterator.h @@ -1,4 +1,4 @@ -//===-- Support/SCCIterator.h - SCC iterator --------------------*- C++ -*-===// +//===-- Support/SCCIterator.h - Strongly Connected Comp. Iter. --*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// // -// This builds on the Support/GraphTraits.h file to find the strongly connected +// This builds on the llvm/ADT/GraphTraits.h file to find the strongly connected // components (SCCs) of a graph in O(N+E) time using Tarjan's DFS algorithm. // // The SCC iterator has the important property that if a node in SCC S1 has an @@ -18,11 +18,11 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_SCCITERATOR_H -#define SUPPORT_SCCITERATOR_H +#ifndef LLVM_ADT_SCCITERATOR_H +#define LLVM_ADT_SCCITERATOR_H -#include "Support/GraphTraits.h" -#include "Support/iterator" +#include "llvm/ADT/GraphTraits.h" +#include "llvm/ADT/iterator" #include #include diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h index b6379d26232..14b61bc916c 100644 --- a/include/llvm/ADT/STLExtras.h +++ b/include/llvm/ADT/STLExtras.h @@ -1,4 +1,4 @@ -//===- STLExtras.h - Useful functions when working with the STL -*- C++ -*-===// +//===- llvm/ADT/STLExtras.h - Useful STL related functions ------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -14,12 +14,12 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_STLEXTRAS_H -#define SUPPORT_STLEXTRAS_H +#ifndef LLVM_ADT_STLEXTRAS_H +#define LLVM_ADT_STLEXTRAS_H #include #include // for std::pair -#include "Support/iterator" +#include "llvm/ADT/iterator" namespace llvm { diff --git a/include/llvm/ADT/SetOperations.h b/include/llvm/ADT/SetOperations.h index bb1e68e6b29..3be8babc38a 100644 --- a/include/llvm/ADT/SetOperations.h +++ b/include/llvm/ADT/SetOperations.h @@ -1,4 +1,4 @@ -//===-- Support/SetOperations.h - Generic Set Operations --------*- C++ -*-===// +//===-- llvm/ADT/SetOperations.h - Generic Set Operations -------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_SETOPERATIONS_H -#define SUPPORT_SETOPERATIONS_H +#ifndef LLVM_ADT_SETOPERATIONS_H +#define LLVM_ADT_SETOPERATIONS_H namespace llvm { diff --git a/include/llvm/ADT/SetVector.h b/include/llvm/ADT/SetVector.h index c72f49bce89..6135e532861 100644 --- a/include/llvm/ADT/SetVector.h +++ b/include/llvm/ADT/SetVector.h @@ -1,4 +1,4 @@ -//===- SetVector.h - A set with insertion order iteration -------*- C++ -*-===// +//===- llvm/ADT/SetVector.h - Set with insert order iteration ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -14,8 +14,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_SETVECTOR_H -#define SUPPORT_SETVECTOR_H +#ifndef LLVM_ADT_SETVECTOR_H +#define LLVM_ADT_SETVECTOR_H #include #include diff --git a/include/llvm/ADT/Statistic.h b/include/llvm/ADT/Statistic.h index 79d8f9d66ed..31e9ae110d1 100644 --- a/include/llvm/ADT/Statistic.h +++ b/include/llvm/ADT/Statistic.h @@ -1,4 +1,4 @@ -//===-- Support/Statistic.h - Easy way to expose stats ----------*- C++ -*-===// +//===-- llvm/ADT/Statistic.h - Easy way to expose stats ---------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -21,8 +21,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_STATISTIC_H -#define SUPPORT_STATISTIC_H +#ifndef LLVM_ADT_STATISTIC_H +#define LLVM_ADT_STATISTIC_H #include diff --git a/include/llvm/ADT/StringExtras.h b/include/llvm/ADT/StringExtras.h index fcfa65f232f..7e25f654d8f 100644 --- a/include/llvm/ADT/StringExtras.h +++ b/include/llvm/ADT/StringExtras.h @@ -1,4 +1,4 @@ -//===-- Support/StringExtras.h - Useful string functions --------*- C++ -*-===// +//===-- llvm/ADT/StringExtras.h - Useful string functions -------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -11,10 +11,10 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_STRINGEXTRAS_H -#define SUPPORT_STRINGEXTRAS_H +#ifndef LLVM_ADT_STRINGEXTRAS_H +#define LLVM_ADT_STRINGEXTRAS_H -#include "Support/DataTypes.h" +#include "llvm/Support/DataTypes.h" #include #include #include diff --git a/include/llvm/ADT/Tree.h b/include/llvm/ADT/Tree.h index 48ecf5b06dc..3193eecba21 100644 --- a/include/llvm/ADT/Tree.h +++ b/include/llvm/ADT/Tree.h @@ -1,4 +1,4 @@ -//===- Support/Tree.h - Generic n-way tree structure ------------*- C++ -*-===// +//===- llvm/ADT/Tree.h - Generic n-way tree structure -----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_TREE_H -#define SUPPORT_TREE_H +#ifndef LLVM_ADT_TREE_H +#define LLVM_ADT_TREE_H #include diff --git a/include/llvm/ADT/VectorExtras.h b/include/llvm/ADT/VectorExtras.h index cf7cf5d2ebb..adc3ff720de 100644 --- a/include/llvm/ADT/VectorExtras.h +++ b/include/llvm/ADT/VectorExtras.h @@ -1,4 +1,4 @@ -//===-- VectorExtras.h - Helper functions for std::vector -------*- C++ -*-===// +//===-- llvm/ADT/VectorExtras.h - Helpers for std::vector -------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_VECTOREXTRAS_H -#define SUPPORT_VECTOREXTRAS_H +#ifndef LLVM_ADT_VECTOREXTRAS_H +#define LLVM_ADT_VECTOREXTRAS_H #include diff --git a/include/llvm/ADT/hash_map.in b/include/llvm/ADT/hash_map.in index 0253de788fe..9f09ef2ba1c 100644 --- a/include/llvm/ADT/hash_map.in +++ b/include/llvm/ADT/hash_map.in @@ -1,4 +1,4 @@ -//===-- Support/hash_map - "Portable" wrapper around hash_map ---*- C++ -*-===// +//===-- llvm/ADT/hash_map - "Portable" wrapper around hash_map --*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -14,8 +14,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_HASH_MAP -#define SUPPORT_HASH_MAP +#ifndef LLVM_ADT_HASH_MAP +#define LLVM_ADT_HASH_MAP // Compiler Support Matrix // @@ -61,6 +61,6 @@ using HASH_NAMESPACE::hash; // out specializations like stl_bvector.h, causing link conflicts. #include -#include +#include #endif diff --git a/include/llvm/ADT/hash_set.in b/include/llvm/ADT/hash_set.in index 49c5d732e8f..6da8c7f6a31 100644 --- a/include/llvm/ADT/hash_set.in +++ b/include/llvm/ADT/hash_set.in @@ -1,4 +1,4 @@ -//===-- Support/hash_set - "Portable" wrapper around hash_set ---*- C++ -*-===// +//===-- llvm/ADT/hash_set - "Portable" wrapper around hash_set --*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -15,8 +15,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_HASH_SET -#define SUPPORT_HASH_SET +#ifndef LLVM_ADT_HASH_SET +#define LLVM_ADT_HASH_SET // Compiler Support Matrix // @@ -62,6 +62,6 @@ using HASH_NAMESPACE::hash; // out specializations like stl_bvector.h, causing link conflicts. #include -#include +#include #endif diff --git a/include/llvm/ADT/ilist b/include/llvm/ADT/ilist index 9d9fdf0fdb8..8c447c92e9b 100644 --- a/include/llvm/ADT/ilist +++ b/include/llvm/ADT/ilist @@ -1,4 +1,4 @@ -//===-- Support/ilist - Intrusive Linked List Template ----------*- C++ -*-===// +//===-- llvm/ADT/ilist - Intrusive Linked List Template ---------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -35,10 +35,10 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_ILIST -#define SUPPORT_ILIST +#ifndef LLVM_ADT_ILIST +#define LLVM_ADT_ILIST -#include +#include #include namespace llvm { diff --git a/include/llvm/ADT/iterator.in b/include/llvm/ADT/iterator.in index 93813e19859..072beb71ee6 100644 --- a/include/llvm/ADT/iterator.in +++ b/include/llvm/ADT/iterator.in @@ -1,4 +1,4 @@ -//===-- Support/iterator - "Portable" wrapper around -*- C++ -*-===// +//===-- llvm/ADT/iterator - Portable wrapper around --*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -25,8 +25,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_ITERATOR -#define SUPPORT_ITERATOR +#ifndef LLVM_ADT_ITERATOR +#define LLVM_ADT_ITERATOR #include diff --git a/include/llvm/Analysis/AliasSetTracker.h b/include/llvm/Analysis/AliasSetTracker.h index 544b2b945de..ddcbbb0ad53 100644 --- a/include/llvm/Analysis/AliasSetTracker.h +++ b/include/llvm/Analysis/AliasSetTracker.h @@ -18,9 +18,9 @@ #define LLVM_ANALYSIS_ALIASSETTRACKER_H #include "llvm/Support/CallSite.h" -#include "Support/iterator" -#include "Support/hash_map" -#include "Support/ilist" +#include "llvm/ADT/iterator" +#include "llvm/ADT/hash_map" +#include "llvm/ADT/ilist" namespace llvm { diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h index 86a2b53ad49..2a1f49c83c8 100644 --- a/include/llvm/Analysis/CallGraph.h +++ b/include/llvm/Analysis/CallGraph.h @@ -51,8 +51,8 @@ #ifndef LLVM_ANALYSIS_CALLGRAPH_H #define LLVM_ANALYSIS_CALLGRAPH_H -#include "Support/GraphTraits.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/GraphTraits.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/Pass.h" namespace llvm { diff --git a/include/llvm/Analysis/ConstantsScanner.h b/include/llvm/Analysis/ConstantsScanner.h index e1533c35bb0..48c0bd08759 100644 --- a/include/llvm/Analysis/ConstantsScanner.h +++ b/include/llvm/Analysis/ConstantsScanner.h @@ -18,7 +18,7 @@ #include "llvm/Support/InstIterator.h" #include "llvm/Instruction.h" -#include "Support/iterator" +#include "llvm/ADT/iterator" namespace llvm { diff --git a/include/llvm/Analysis/DataStructure/DSGraphTraits.h b/include/llvm/Analysis/DataStructure/DSGraphTraits.h index 608cd198efc..efb31517d12 100644 --- a/include/llvm/Analysis/DataStructure/DSGraphTraits.h +++ b/include/llvm/Analysis/DataStructure/DSGraphTraits.h @@ -17,9 +17,9 @@ #define LLVM_ANALYSIS_DSGRAPHTRAITS_H #include "llvm/Analysis/DataStructure/DSGraph.h" -#include "Support/GraphTraits.h" -#include "Support/iterator" -#include "Support/STLExtras.h" +#include "llvm/ADT/GraphTraits.h" +#include "llvm/ADT/iterator" +#include "llvm/ADT/STLExtras.h" namespace llvm { diff --git a/include/llvm/Analysis/DataStructure/DSSupport.h b/include/llvm/Analysis/DataStructure/DSSupport.h index 8cce6c98fde..e5bf3904728 100644 --- a/include/llvm/Analysis/DataStructure/DSSupport.h +++ b/include/llvm/Analysis/DataStructure/DSSupport.h @@ -15,7 +15,7 @@ #define LLVM_ANALYSIS_DSSUPPORT_H #include -#include "Support/hash_set" +#include "llvm/ADT/hash_set" #include "llvm/Support/CallSite.h" namespace llvm { diff --git a/include/llvm/Analysis/DataStructure/DataStructure.h b/include/llvm/Analysis/DataStructure/DataStructure.h index f210003213c..9351ed4c988 100644 --- a/include/llvm/Analysis/DataStructure/DataStructure.h +++ b/include/llvm/Analysis/DataStructure/DataStructure.h @@ -16,7 +16,7 @@ #include "llvm/Pass.h" #include "llvm/Target/TargetData.h" -#include "Support/hash_set" +#include "llvm/ADT/hash_set" namespace llvm { diff --git a/include/llvm/Analysis/Interval.h b/include/llvm/Analysis/Interval.h index 0d5912305bc..448bcbc803a 100644 --- a/include/llvm/Analysis/Interval.h +++ b/include/llvm/Analysis/Interval.h @@ -20,7 +20,7 @@ #ifndef LLVM_INTERVAL_H #define LLVM_INTERVAL_H -#include "Support/GraphTraits.h" +#include "llvm/ADT/GraphTraits.h" #include #include diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index 38f9264923b..c5eec834287 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -31,7 +31,7 @@ #define LLVM_ANALYSIS_LOOP_INFO_H #include "llvm/Pass.h" -#include "Support/GraphTraits.h" +#include "llvm/ADT/GraphTraits.h" namespace llvm { diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h index 27acba4c62a..9c82da266ef 100644 --- a/include/llvm/BasicBlock.h +++ b/include/llvm/BasicBlock.h @@ -30,7 +30,7 @@ #include "llvm/Instruction.h" #include "llvm/SymbolTableListTraits.h" -#include "Support/ilist" +#include "llvm/ADT/ilist" namespace llvm { diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h index fb037402903..578f2b6c60f 100644 --- a/include/llvm/CodeGen/MachineBasicBlock.h +++ b/include/llvm/CodeGen/MachineBasicBlock.h @@ -15,8 +15,8 @@ #define LLVM_CODEGEN_MACHINEBASICBLOCK_H #include "llvm/CodeGen/MachineInstr.h" -#include "Support/GraphTraits.h" -#include "Support/ilist" +#include "llvm/ADT/GraphTraits.h" +#include "llvm/ADT/ilist" #include namespace llvm { diff --git a/include/llvm/CodeGen/MachineCodeEmitter.h b/include/llvm/CodeGen/MachineCodeEmitter.h index a46a2c5b59e..0daab91faf7 100644 --- a/include/llvm/CodeGen/MachineCodeEmitter.h +++ b/include/llvm/CodeGen/MachineCodeEmitter.h @@ -18,7 +18,7 @@ #define LLVM_CODEGEN_MACHINECODEEMITTER_H #include -#include "Support/DataTypes.h" +#include "llvm/Support/DataTypes.h" namespace llvm { diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index 69b86a640e8..4420c3b84e8 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -19,7 +19,7 @@ #define LLVM_CODEGEN_MACHINEFUNCTION_H #include "llvm/CodeGen/MachineBasicBlock.h" -#include "Support/Annotation.h" +#include "llvm/Support/Annotation.h" namespace llvm { diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 3a01ab0fbfa..a9f1352b47b 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -16,7 +16,7 @@ #ifndef LLVM_CODEGEN_MACHINEINSTR_H #define LLVM_CODEGEN_MACHINEINSTR_H -#include "Support/iterator" +#include "llvm/ADT/iterator" #include #include #include diff --git a/include/llvm/CodeGen/SSARegMap.h b/include/llvm/CodeGen/SSARegMap.h index afed38a334e..893b0c71670 100644 --- a/include/llvm/CodeGen/SSARegMap.h +++ b/include/llvm/CodeGen/SSARegMap.h @@ -18,7 +18,7 @@ #define LLVM_CODEGEN_SSAREGMAP_H #include "llvm/Target/MRegisterInfo.h" -#include "Support/DenseMap.h" +#include "llvm/ADT/DenseMap.h" namespace llvm { diff --git a/include/llvm/CodeGen/SchedGraphCommon.h b/include/llvm/CodeGen/SchedGraphCommon.h index fbb9dac7517..167bfb0f2d2 100644 --- a/include/llvm/CodeGen/SchedGraphCommon.h +++ b/include/llvm/CodeGen/SchedGraphCommon.h @@ -16,7 +16,7 @@ #define LLVM_CODEGEN_SCHEDGRAPHCOMMON_H #include "llvm/Value.h" -#include "Support/iterator" +#include "llvm/ADT/iterator" #include namespace llvm { diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index 4719bf9d21f..796ee135350 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -23,7 +23,7 @@ #define LLVM_CODEGEN_SELECTIONDAG_H #include "llvm/CodeGen/ValueTypes.h" -#include "Support/DataTypes.h" +#include "llvm/Support/DataTypes.h" #include #include #include diff --git a/include/llvm/Config/alloca.h b/include/llvm/Config/alloca.h index 297b56fa7c5..d2bbec6e526 100644 --- a/include/llvm/Config/alloca.h +++ b/include/llvm/Config/alloca.h @@ -15,7 +15,7 @@ #ifndef _CONFIG_ALLOC_H #define _CONFIG_ALLOC_H -#include "Config/config.h" +#include "llvm/Config/config.h" /* * This is a modified version of that suggested by the Autoconf manual. diff --git a/include/llvm/Config/config.h.in b/include/llvm/Config/config.h.in index fe0c77c8af3..c3046d22d00 100644 --- a/include/llvm/Config/config.h.in +++ b/include/llvm/Config/config.h.in @@ -1,4 +1,4 @@ -/* include/Config/config.h.in. Generated from autoconf/configure.ac by autoheader. */ +/* include/llvm/Config/config.h.in. Generated from autoconf/configure.ac by autoheader. */ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. diff --git a/include/llvm/Config/dlfcn.h b/include/llvm/Config/dlfcn.h index c7ce5b19688..bf51315ce25 100644 --- a/include/llvm/Config/dlfcn.h +++ b/include/llvm/Config/dlfcn.h @@ -14,7 +14,7 @@ #ifndef _CONFIG_DLFCN_H #define _CONFIG_DLFCN_H -#include "Config/config.h" +#include "llvm/Config/config.h" #ifdef HAVE_DLFCN_H #include diff --git a/include/llvm/Config/fcntl.h b/include/llvm/Config/fcntl.h index ed8a1c839b5..2d0d44d9565 100644 --- a/include/llvm/Config/fcntl.h +++ b/include/llvm/Config/fcntl.h @@ -14,7 +14,7 @@ #ifndef _CONFIG_FCNTL_H #define _CONFIG_FCNTL_H -#include "Config/config.h" +#include "llvm/Config/config.h" #ifdef HAVE_FCNTL_H #include diff --git a/include/llvm/Config/limits.h b/include/llvm/Config/limits.h index e5a787e5e14..1182d90b57b 100644 --- a/include/llvm/Config/limits.h +++ b/include/llvm/Config/limits.h @@ -14,7 +14,7 @@ #ifndef _CONFIG_LIMITS_H #define _CONFIG_LIMITS_H -#include "Config/config.h" +#include "llvm/Config/config.h" #ifdef HAVE_LIMITS_H #include diff --git a/include/llvm/Config/malloc.h b/include/llvm/Config/malloc.h index c78408a3598..7d16a406705 100644 --- a/include/llvm/Config/malloc.h +++ b/include/llvm/Config/malloc.h @@ -15,7 +15,7 @@ #ifndef _SUPPORT_MALLOC_H #define _SUPPORT_MALLOC_H -#include "Config/config.h" +#include "llvm/Config/config.h" #ifdef HAVE_MALLOC_H #include diff --git a/include/llvm/Config/memory.h b/include/llvm/Config/memory.h index f75902b5bc5..f6fbbaf7359 100644 --- a/include/llvm/Config/memory.h +++ b/include/llvm/Config/memory.h @@ -14,7 +14,7 @@ #ifndef _CONFIG_MEMORY_H #define _CONFIG_MEMORY_H -#include "Config/config.h" +#include "llvm/Config/config.h" #ifdef HAVE_MEMORY_H #include diff --git a/include/llvm/Config/pagesize.h b/include/llvm/Config/pagesize.h index f37b29770d4..adbf87893ee 100644 --- a/include/llvm/Config/pagesize.h +++ b/include/llvm/Config/pagesize.h @@ -12,7 +12,7 @@ #ifndef PAGESIZE_H #define PAGESIZE_H -#include "Config/unistd.h" +#include "llvm/Config/unistd.h" #include namespace llvm { diff --git a/include/llvm/Config/stdint.h b/include/llvm/Config/stdint.h index a98961063ef..44db789d0d3 100644 --- a/include/llvm/Config/stdint.h +++ b/include/llvm/Config/stdint.h @@ -14,7 +14,7 @@ #ifndef _CONFIG_STDINT_H #define _CONFIG_STDINT_H -#include "Config/config.h" +#include "llvm/Config/config.h" #ifdef HAVE_STDINT_H #include diff --git a/include/llvm/Config/sys/mman.h b/include/llvm/Config/sys/mman.h index 7f51e7fbfbe..92f394989af 100644 --- a/include/llvm/Config/sys/mman.h +++ b/include/llvm/Config/sys/mman.h @@ -18,7 +18,7 @@ #ifndef _CONFIG_MMAN_H #define _CONFIG_MMAN_H -#include "Config/config.h" +#include "llvm/Config/config.h" #if defined(HAVE_SYS_MMAN_H) && !defined(_MSC_VER) #include diff --git a/include/llvm/Config/sys/resource.h b/include/llvm/Config/sys/resource.h index 1f4cc694b29..11cb7709ca4 100644 --- a/include/llvm/Config/sys/resource.h +++ b/include/llvm/Config/sys/resource.h @@ -16,7 +16,7 @@ #ifndef _CONFIG_SYS_RESOURCE_H #define _CONFIG_SYS_RESOURCE_H -#include "Config/config.h" +#include "llvm/Config/config.h" #if defined(HAVE_SYS_RESOURCE_H) && !defined(_MSC_VER) @@ -25,9 +25,9 @@ * stuff. Some man pages say that you also need sys/time.h and unistd.h. * So, to be paranoid, we will try to include all three if possible. */ -#include "Config/sys/time.h" +#include "llvm/Config/sys/time.h" #include -#include "Config/unistd.h" +#include "llvm/Config/unistd.h" #endif diff --git a/include/llvm/Config/sys/stat.h b/include/llvm/Config/sys/stat.h index 9669bcf927b..98b7f72e0a4 100644 --- a/include/llvm/Config/sys/stat.h +++ b/include/llvm/Config/sys/stat.h @@ -15,7 +15,7 @@ #ifndef _CONFIG_SYS_STAT_H #define _CONFIG_SYS_STAT_H -#include "Config/config.h" +#include "llvm/Config/config.h" #ifdef HAVE_SYS_STAT_H #include diff --git a/include/llvm/Config/sys/time.h b/include/llvm/Config/sys/time.h index 3e0ea1e8109..f5ca3961f25 100644 --- a/include/llvm/Config/sys/time.h +++ b/include/llvm/Config/sys/time.h @@ -15,7 +15,7 @@ #ifndef _CONFIG_SYS_TIME_H #define _CONFIG_SYS_TIME_H -#include "Config/config.h" +#include "llvm/Config/config.h" #if defined(HAVE_SYS_TIME_H) && !defined(_MSC_VER) #include diff --git a/include/llvm/Config/sys/types.h b/include/llvm/Config/sys/types.h index f0a7abec355..fd6becd38f0 100644 --- a/include/llvm/Config/sys/types.h +++ b/include/llvm/Config/sys/types.h @@ -15,7 +15,7 @@ #ifndef _CONFIG_SYS_TYPES_H #define _CONFIG_SYS_TYPES_H -#include "Config/config.h" +#include "llvm/Config/config.h" #ifdef HAVE_SYS_TYPES_H #include diff --git a/include/llvm/Config/sys/wait.h b/include/llvm/Config/sys/wait.h index b3db60e435c..a1c70fbc6c4 100644 --- a/include/llvm/Config/sys/wait.h +++ b/include/llvm/Config/sys/wait.h @@ -14,7 +14,7 @@ #ifndef _CONFIG_SYS_WAIT_H #define _CONFIG_SYS_WAIT_H -#include "Config/config.h" +#include "llvm/Config/config.h" #ifdef HAVE_SYS_WAIT_H #include diff --git a/include/llvm/Config/time.h b/include/llvm/Config/time.h index b2f3e6ee053..6d66efad1c6 100644 --- a/include/llvm/Config/time.h +++ b/include/llvm/Config/time.h @@ -24,7 +24,7 @@ #ifndef _CONFIG_TIME_H #define _CONFIG_TIME_H -#include "Config/config.h" +#include "llvm/Config/config.h" #ifdef HAVE_TIME_H #include diff --git a/include/llvm/Config/unistd.h b/include/llvm/Config/unistd.h index 847db7a3c6e..d6e90d0f9f4 100644 --- a/include/llvm/Config/unistd.h +++ b/include/llvm/Config/unistd.h @@ -14,7 +14,7 @@ #ifndef _CONFIG_UNISTD_H #define _CONFIG_UNISTD_H -#include "Config/config.h" +#include "llvm/Config/config.h" #if defined(HAVE_UNISTD_H) && !defined(_MSC_VER) #include diff --git a/include/llvm/Config/windows.h b/include/llvm/Config/windows.h index fded99fba8e..ab443911a2f 100644 --- a/include/llvm/Config/windows.h +++ b/include/llvm/Config/windows.h @@ -14,7 +14,7 @@ #ifndef LLVM_CONFIG_WINDOWS_H #define LLVM_CONFIG_WINDOWS_H -#include "Config/config.h" +#include "llvm/Config/config.h" #ifdef HAVE_WINDOWS_H #include diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index 5ef2cb01322..d0f577311eb 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -17,7 +17,7 @@ #include "llvm/Constant.h" #include "llvm/Type.h" -#include "Support/DataTypes.h" +#include "llvm/Support/DataTypes.h" namespace llvm { diff --git a/include/llvm/ExecutionEngine/GenericValue.h b/include/llvm/ExecutionEngine/GenericValue.h index 7cf1a7b3952..6ea4366784b 100644 --- a/include/llvm/ExecutionEngine/GenericValue.h +++ b/include/llvm/ExecutionEngine/GenericValue.h @@ -15,7 +15,7 @@ #ifndef GENERIC_VALUE_H #define GENERIC_VALUE_H -#include "Support/DataTypes.h" +#include "llvm/Support/DataTypes.h" namespace llvm { diff --git a/include/llvm/Function.h b/include/llvm/Function.h index b363191b93c..9e17f2602cc 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -21,7 +21,7 @@ #include "llvm/GlobalValue.h" #include "llvm/BasicBlock.h" #include "llvm/Argument.h" -#include "Support/Annotation.h" +#include "llvm/Support/Annotation.h" namespace llvm { diff --git a/include/llvm/Support/Annotation.h b/include/llvm/Support/Annotation.h index efca20a3ec0..4325836c290 100644 --- a/include/llvm/Support/Annotation.h +++ b/include/llvm/Support/Annotation.h @@ -1,4 +1,4 @@ -//===-- Support/Annotation.h - Annotation classes ---------------*- C++ -*-===// +//===-- llvm/Support/Annotation.h - Annotation classes ----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -19,8 +19,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_ANNOTATION_H -#define SUPPORT_ANNOTATION_H +#ifndef LLVM_SUPPORT_ANNOTATION_H +#define LLVM_SUPPORT_ANNOTATION_H #include #include diff --git a/include/llvm/Support/CFG.h b/include/llvm/Support/CFG.h index a20265cd0c4..badb846bac3 100644 --- a/include/llvm/Support/CFG.h +++ b/include/llvm/Support/CFG.h @@ -15,10 +15,10 @@ #ifndef LLVM_SUPPORT_CFG_H #define LLVM_SUPPORT_CFG_H -#include "Support/GraphTraits.h" +#include "llvm/ADT/GraphTraits.h" #include "llvm/Function.h" #include "llvm/InstrTypes.h" -#include "Support/iterator" +#include "llvm/ADT/iterator" namespace llvm { diff --git a/include/llvm/Support/Casting.h b/include/llvm/Support/Casting.h index abc80aac7af..d1897548657 100644 --- a/include/llvm/Support/Casting.h +++ b/include/llvm/Support/Casting.h @@ -1,4 +1,4 @@ -//===-- Support/Casting.h - Allow flexible, checked, casts ------*- C++ -*-===// +//===-- llvm/Support/Casting.h - Allow flexible, checked, casts -*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_CASTING_H -#define SUPPORT_CASTING_H +#ifndef LLVM_SUPPORT_CASTING_H +#define LLVM_SUPPORT_CASTING_H namespace llvm { diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 053b823669e..2c38e0aac06 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -1,4 +1,4 @@ -//===- Support/CommandLine.h - Flexible Command line parser -----*- C++ -*-===// +//===- llvm/Support/CommandLine.h - Command line handler --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -17,10 +17,10 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_COMMANDLINE_H -#define SUPPORT_COMMANDLINE_H +#ifndef LLVM_SUPPORT_COMMANDLINE_H +#define LLVM_SUPPORT_COMMANDLINE_H -#include "Support/type_traits.h" +#include "llvm/Support/type_traits.h" #include #include #include diff --git a/include/llvm/Support/ConstantRange.h b/include/llvm/Support/ConstantRange.h index 30618a16921..0c8b3b6b4cc 100644 --- a/include/llvm/Support/ConstantRange.h +++ b/include/llvm/Support/ConstantRange.h @@ -24,7 +24,7 @@ #ifndef LLVM_SUPPORT_CONSTANT_RANGE_H #define LLVM_SUPPORT_CONSTANT_RANGE_H -#include "Support/DataTypes.h" +#include "llvm/Support/DataTypes.h" #include namespace llvm { diff --git a/include/llvm/Support/DOTGraphTraits.h b/include/llvm/Support/DOTGraphTraits.h index 7dbc4ff0b65..b83b759f407 100644 --- a/include/llvm/Support/DOTGraphTraits.h +++ b/include/llvm/Support/DOTGraphTraits.h @@ -1,4 +1,4 @@ -//===-- Support/DotGraphTraits.h - Customize .dot output --------*- C++ -*-===// +//===-- llvm/Support/DotGraphTraits.h - Customize .dot output ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -14,8 +14,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_DOTGRAPHTRAITS_H -#define SUPPORT_DOTGRAPHTRAITS_H +#ifndef LLVM_SUPPORT_DOTGRAPHTRAITS_H +#define LLVM_SUPPORT_DOTGRAPHTRAITS_H #include diff --git a/include/llvm/Support/Debug.h b/include/llvm/Support/Debug.h index f0a1b3dc5bd..263547c9804 100644 --- a/include/llvm/Support/Debug.h +++ b/include/llvm/Support/Debug.h @@ -1,4 +1,4 @@ -//===- Debug.h - An easy way to add debug output to your code ---*- C++ -*-===// +//===- llvm/Support/Debug.h - Easy way to add debug output ------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -23,8 +23,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_DEBUG_H -#define SUPPORT_DEBUG_H +#ifndef LLVM_SUPPORT_DEBUG_H +#define LLVM_SUPPORT_DEBUG_H // Unsurprisingly, most users of this macro use std::cerr too. #include diff --git a/include/llvm/Support/DynamicLinker.h b/include/llvm/Support/DynamicLinker.h index fec9a45296c..4f0bb58cab1 100644 --- a/include/llvm/Support/DynamicLinker.h +++ b/include/llvm/Support/DynamicLinker.h @@ -1,4 +1,4 @@ -//===-- DynamicLinker.h - System-indep. DynamicLinker interface -*- C++ -*-===// +//===-- llvm/Support/DynamicLinker.h - Portable Dynamic Linker --*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -13,8 +13,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_DYNAMICLINKER_H -#define SUPPORT_DYNAMICLINKER_H +#ifndef LLVM_SUPPORT_DYNAMICLINKER_H +#define LLVM_SUPPORT_DYNAMICLINKER_H #include diff --git a/include/llvm/Support/ELF.h b/include/llvm/Support/ELF.h index e4b87b90222..8d9f693cf6c 100644 --- a/include/llvm/Support/ELF.h +++ b/include/llvm/Support/ELF.h @@ -1,4 +1,4 @@ -//===-- Support/ELF.h - ELF constants and data structures -------*- C++ -*-===// +//===-- llvm/Support/ELF.h - ELF constants and data structures --*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -18,7 +18,10 @@ // //===----------------------------------------------------------------------===// -#include "Support/DataTypes.h" +#ifndef LLVM_SUPPORT_ELF_H +#define LLVM_SUPPORT_ELF_H + +#include "llvm/Support/DataTypes.h" #include #include @@ -293,3 +296,5 @@ enum { } // end namespace ELF } // end namespace llvm + +#endif diff --git a/include/llvm/Support/FileUtilities.h b/include/llvm/Support/FileUtilities.h index 78983b8352c..c9f52c32488 100644 --- a/include/llvm/Support/FileUtilities.h +++ b/include/llvm/Support/FileUtilities.h @@ -1,4 +1,4 @@ -//===- Support/FileUtilities.h - File System Utilities ----------*- C++ -*-===// +//===- llvm/Support/FileUtilities.h - File System Utilities -----*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_FILEUTILITIES_H -#define SUPPORT_FILEUTILITIES_H +#ifndef LLVM_SUPPORT_FILEUTILITIES_H +#define LLVM_SUPPORT_FILEUTILITIES_H #include diff --git a/include/llvm/Support/GraphWriter.h b/include/llvm/Support/GraphWriter.h index c6a5c3cdc94..feb9900d3b8 100644 --- a/include/llvm/Support/GraphWriter.h +++ b/include/llvm/Support/GraphWriter.h @@ -1,4 +1,4 @@ -//===-- Support/GraphWriter.h - Write a graph to a .dot file ----*- C++ -*-===// +//===-- llvm/Support/GraphWriter.h - Write graph to a .dot file -*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -20,11 +20,11 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_GRAPHWRITER_H -#define SUPPORT_GRAPHWRITER_H +#ifndef LLVM_SUPPORT_GRAPHWRITER_H +#define LLVM_SUPPORT_GRAPHWRITER_H -#include "Support/DOTGraphTraits.h" -#include "Support/GraphTraits.h" +#include "llvm/Support/DOTGraphTraits.h" +#include "llvm/ADT/GraphTraits.h" #include #include diff --git a/include/llvm/Support/LeakDetector.h b/include/llvm/Support/LeakDetector.h index e2ce9c50bea..6ca5405bc43 100644 --- a/include/llvm/Support/LeakDetector.h +++ b/include/llvm/Support/LeakDetector.h @@ -1,4 +1,4 @@ -//===-- Support/LeakDetector.h - Provide simple leak detection --*- C++ -*-===// +//===-- llvm/Support/LeakDetector.h - Provide leak detection ----*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -19,8 +19,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_LEAKDETECTOR_H -#define SUPPORT_LEAKDETECTOR_H +#ifndef LLVM_SUPPORT_LEAKDETECTOR_H +#define LLVM_SUPPORT_LEAKDETECTOR_H #include diff --git a/include/llvm/Support/MallocAllocator.h b/include/llvm/Support/MallocAllocator.h index 3e3da4139c1..c17517e2a0c 100644 --- a/include/llvm/Support/MallocAllocator.h +++ b/include/llvm/Support/MallocAllocator.h @@ -1,4 +1,4 @@ -//===-- Support/MallocAllocator.h - Allocator using malloc/free -*- C++ -*-===// +//===-- llvm/Support/MallocAllocator.h --------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -17,8 +17,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_MALLOCALLOCATOR_H -#define SUPPORT_MALLOCALLOCATOR_H +#ifndef LLVM_SUPPORT_MALLOCALLOCATOR_H +#define LLVM_SUPPORT_MALLOCALLOCATOR_H #include #include diff --git a/include/llvm/Support/Mangler.h b/include/llvm/Support/Mangler.h index 4043d85a715..14d68b59d32 100644 --- a/include/llvm/Support/Mangler.h +++ b/include/llvm/Support/Mangler.h @@ -1,4 +1,4 @@ -//===-- Mangler.h - Self-contained llvm name mangler ------------*- C++ -*-===// +//===-- llvm/Support/Mangler.h - Self-contained name mangler ----*- C++ -*-===// // // The LLVM Compiler Infrastructure // diff --git a/include/llvm/Support/MathExtras.h b/include/llvm/Support/MathExtras.h index c1384d3eff5..bfc175f2c1f 100644 --- a/include/llvm/Support/MathExtras.h +++ b/include/llvm/Support/MathExtras.h @@ -1,4 +1,4 @@ -//===-- Support/MathExtras.h - Useful math functions ------------*- C++ -*-===// +//===-- llvm/Support/MathExtras.h - Useful math functions -------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -11,10 +11,10 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_MATHEXTRAS_H -#define SUPPORT_MATHEXTRAS_H +#ifndef LLVM_SUPPORT_MATHEXTRAS_H +#define LLVM_SUPPORT_MATHEXTRAS_H -#include "Support/DataTypes.h" +#include "llvm/Support/DataTypes.h" namespace llvm { diff --git a/include/llvm/Support/MutexGuard.h b/include/llvm/Support/MutexGuard.h index 470010219fc..48428b8cdef 100644 --- a/include/llvm/Support/MutexGuard.h +++ b/include/llvm/Support/MutexGuard.h @@ -18,9 +18,9 @@ #define SUPPORT_THREADSUPPORT_H #if @HAVE_PTHREAD_MUTEX_LOCK@ -#include "Support/ThreadSupport-PThreads.h" +#include "llvm/Support/ThreadSupport-PThreads.h" #else -#include "Support/ThreadSupport-NoSupport.h" +#include "llvm/Support/ThreadSupport-NoSupport.h" #endif // If no system support is available namespace llvm { diff --git a/include/llvm/Support/PassNameParser.h b/include/llvm/Support/PassNameParser.h index 0ffcabad52a..71ebe41a459 100644 --- a/include/llvm/Support/PassNameParser.h +++ b/include/llvm/Support/PassNameParser.h @@ -23,7 +23,7 @@ #ifndef LLVM_SUPPORT_PASS_NAME_PARSER_H #define LLVM_SUPPORT_PASS_NAME_PARSER_H -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Pass.h" #include #include diff --git a/include/llvm/Support/PluginLoader.h b/include/llvm/Support/PluginLoader.h index 7410895c3af..48f8a7d8dc2 100644 --- a/include/llvm/Support/PluginLoader.h +++ b/include/llvm/Support/PluginLoader.h @@ -1,4 +1,4 @@ -//===-- Support/PluginLoader.h - Provide -load option to tool ---*- C++ -*-===// +//===-- llvm/Support/PluginLoader.h - Plugin Loader for Tools ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -14,10 +14,10 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_PLUGINLOADER_H -#define SUPPORT_PLUGINLOADER_H +#ifndef LLVM_SUPPORT_PLUGINLOADER_H +#define LLVM_SUPPORT_PLUGINLOADER_H -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" namespace llvm { struct PluginLoader { diff --git a/include/llvm/Support/SlowOperationInformer.h b/include/llvm/Support/SlowOperationInformer.h index 67edf7df42b..896fd3fb062 100644 --- a/include/llvm/Support/SlowOperationInformer.h +++ b/include/llvm/Support/SlowOperationInformer.h @@ -1,4 +1,4 @@ -//===- SlowOperationInformer.h - Keep the user informed ---------*- C++ -*-===// +//===- llvm/Support/SlowOperationInformer.h - Keep user informed *- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -28,8 +28,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_SLOW_OPERATION_INFORMER_H -#define SUPPORT_SLOW_OPERATION_INFORMER_H +#ifndef LLVM_SUPPORT_SLOW_OPERATION_INFORMER_H +#define LLVM_SUPPORT_SLOW_OPERATION_INFORMER_H #include #include diff --git a/include/llvm/Support/SystemUtils.h b/include/llvm/Support/SystemUtils.h index b8c130cc974..aea7df80eba 100644 --- a/include/llvm/Support/SystemUtils.h +++ b/include/llvm/Support/SystemUtils.h @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SYSTEMUTILS_H -#define SYSTEMUTILS_H +#ifndef LLVM_SUPPORT_SYSTEMUTILS_H +#define LLVM_SUPPORT_SYSTEMUTILS_H #include diff --git a/include/llvm/Support/ThreadSupport-NoSupport.h b/include/llvm/Support/ThreadSupport-NoSupport.h index 5dc954efab1..3602e21cea4 100644 --- a/include/llvm/Support/ThreadSupport-NoSupport.h +++ b/include/llvm/Support/ThreadSupport-NoSupport.h @@ -1,4 +1,4 @@ -//===-- Support/ThreadSupport-NoSupport.h - Generic impl --------*- C++ -*-===// +//===-- llvm/Support/ThreadSupport-NoSupport.h - Generic Impl ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -16,7 +16,7 @@ // Users should never #include this file directly! As such, no include guards // are needed. -#ifndef SUPPORT_THREADSUPPORT_H +#ifndef LLVM_SUPPORT_THREADSUPPORT_H #error "Code should not #include Support/ThreadSupport-NoSupport.h directly!" #endif diff --git a/include/llvm/Support/ThreadSupport-PThreads.h b/include/llvm/Support/ThreadSupport-PThreads.h index 6bbe682c089..1bd3f32a99e 100644 --- a/include/llvm/Support/ThreadSupport-PThreads.h +++ b/include/llvm/Support/ThreadSupport-PThreads.h @@ -1,4 +1,4 @@ -//===-- Support/ThreadSupport-PThreads.h - PThreads support -----*- C++ -*-===// +//===-- llvm/Support/ThreadSupport-PThreads.h - PThreads support *- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -15,7 +15,7 @@ // Users should never #include this file directly! As such, no include guards // are needed. -#ifndef SUPPORT_THREADSUPPORT_H +#ifndef LLVM_SUPPORT_THREADSUPPORT_H #error "Code should not #include Support/ThreadSupport/PThreads.h directly!" #endif diff --git a/include/llvm/Support/ThreadSupport.h.in b/include/llvm/Support/ThreadSupport.h.in index 470010219fc..48428b8cdef 100644 --- a/include/llvm/Support/ThreadSupport.h.in +++ b/include/llvm/Support/ThreadSupport.h.in @@ -18,9 +18,9 @@ #define SUPPORT_THREADSUPPORT_H #if @HAVE_PTHREAD_MUTEX_LOCK@ -#include "Support/ThreadSupport-PThreads.h" +#include "llvm/Support/ThreadSupport-PThreads.h" #else -#include "Support/ThreadSupport-NoSupport.h" +#include "llvm/Support/ThreadSupport-NoSupport.h" #endif // If no system support is available namespace llvm { diff --git a/include/llvm/Support/Timer.h b/include/llvm/Support/Timer.h index ac465bb95b2..a31dd3d93cf 100644 --- a/include/llvm/Support/Timer.h +++ b/include/llvm/Support/Timer.h @@ -1,4 +1,4 @@ -//===-- Support/Timer.h - Interval Timing Support ---------------*- C++ -*-===// +//===-- llvm/Support/Timer.h - Interval Timing Support ----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_TIMER_H -#define SUPPORT_TIMER_H +#ifndef LLVM_SUPPORT_TIMER_H +#define LLVM_SUPPORT_TIMER_H #include #include diff --git a/include/llvm/Support/ToolRunner.h b/include/llvm/Support/ToolRunner.h index bd085eab6d0..c5d89da46df 100644 --- a/include/llvm/Support/ToolRunner.h +++ b/include/llvm/Support/ToolRunner.h @@ -1,4 +1,4 @@ -//===-- Support/ToolRunner.h ------------------------------------*- C++ -*-===// +//===-- llvm/Support/ToolRunner.h -------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -14,10 +14,10 @@ // //===----------------------------------------------------------------------===// -#ifndef TOOLRUNNER_H -#define TOOLRUNNER_H +#ifndef LLVM_SUPPORT_TOOLRUNNER_H +#define LLVM_SUPPORT_TOOLRUNNER_H -#include "Support/SystemUtils.h" +#include "llvm/Support/SystemUtils.h" #include #include diff --git a/include/llvm/Support/TypeInfo.h b/include/llvm/Support/TypeInfo.h index e23f906afa7..54043af9def 100644 --- a/include/llvm/Support/TypeInfo.h +++ b/include/llvm/Support/TypeInfo.h @@ -1,4 +1,4 @@ -//===- Support/TypeInfo.h - Support class for type_info objects -*- C++ -*-===// +//===- llvm/Support/TypeInfo.h - Support for type_info objects -*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -13,8 +13,8 @@ // //===----------------------------------------------------------------------===// -#ifndef SUPPORT_TYPEINFO_H -#define SUPPORT_TYPEINFO_H +#ifndef LLVM_SUPPORT_TYPEINFO_H +#define LLVM_SUPPORT_TYPEINFO_H #include diff --git a/include/llvm/Support/type_traits.h b/include/llvm/Support/type_traits.h index de932b28db8..36bbdb8ea42 100644 --- a/include/llvm/Support/type_traits.h +++ b/include/llvm/Support/type_traits.h @@ -1,4 +1,4 @@ -//===- Support/type_traits.h - Simplfied type traits ------------*- C++ -*-===// +//===- llvm/Support/type_traits.h - Simplfied type traits -------*- C++ -*-===// // // The LLVM Compiler Infrastructure // diff --git a/include/llvm/Target/TargetData.h b/include/llvm/Target/TargetData.h index d354d2098ce..9de9d7044a8 100644 --- a/include/llvm/Target/TargetData.h +++ b/include/llvm/Target/TargetData.h @@ -21,7 +21,7 @@ #define LLVM_TARGET_TARGETDATA_H #include "llvm/Pass.h" -#include "Support/DataTypes.h" +#include "llvm/Support/DataTypes.h" #include #include diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h index bc25fa722b7..d5f4b94d967 100644 --- a/include/llvm/Target/TargetInstrInfo.h +++ b/include/llvm/Target/TargetInstrInfo.h @@ -15,7 +15,7 @@ #define LLVM_TARGET_TARGETINSTRINFO_H #include "llvm/CodeGen/MachineBasicBlock.h" -#include "Support/DataTypes.h" +#include "llvm/Support/DataTypes.h" #include #include diff --git a/include/llvm/Target/TargetMachineRegistry.h b/include/llvm/Target/TargetMachineRegistry.h index 008b69c1db4..08ab56e10ae 100644 --- a/include/llvm/Target/TargetMachineRegistry.h +++ b/include/llvm/Target/TargetMachineRegistry.h @@ -17,7 +17,7 @@ #ifndef LLVM_TARGET_TARGETMACHINEREGISTRY_H #define LLVM_TARGET_TARGETMACHINEREGISTRY_H -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" namespace llvm { class Module; diff --git a/include/llvm/Target/TargetSchedInfo.h b/include/llvm/Target/TargetSchedInfo.h index b7bd81f35a6..f2a3560496c 100644 --- a/include/llvm/Target/TargetSchedInfo.h +++ b/include/llvm/Target/TargetSchedInfo.h @@ -17,7 +17,7 @@ #define LLVM_TARGET_TARGETSCHEDINFO_H #include "llvm/Target/TargetInstrInfo.h" -#include "Support/hash_map" +#include "llvm/ADT/hash_map" #include namespace llvm { diff --git a/include/llvm/Type.h b/include/llvm/Type.h index fcaa9f56690..dbc7881eb1f 100644 --- a/include/llvm/Type.h +++ b/include/llvm/Type.h @@ -35,9 +35,9 @@ #define LLVM_TYPE_H #include "AbstractTypeUser.h" -#include "Support/Casting.h" -#include "Support/GraphTraits.h" -#include "Support/iterator" +#include "llvm/Support/Casting.h" +#include "llvm/ADT/GraphTraits.h" +#include "llvm/ADT/iterator" #include namespace llvm { diff --git a/include/llvm/Use.h b/include/llvm/Use.h index fb5eafb7122..03afc24580f 100644 --- a/include/llvm/Use.h +++ b/include/llvm/Use.h @@ -16,7 +16,7 @@ #ifndef LLVM_USE_H #define LLVM_USE_H -#include "Support/ilist" +#include "llvm/ADT/ilist" namespace llvm { diff --git a/include/llvm/Value.h b/include/llvm/Value.h index f5381efd0d7..2b10a841a01 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -19,7 +19,7 @@ #include "llvm/AbstractTypeUser.h" #include "llvm/Use.h" -#include "Support/Casting.h" +#include "llvm/Support/Casting.h" #include namespace llvm { diff --git a/lib/Analysis/AliasAnalysisEvaluator.cpp b/lib/Analysis/AliasAnalysisEvaluator.cpp index b4a183d1c40..af0a25a409d 100644 --- a/lib/Analysis/AliasAnalysisEvaluator.cpp +++ b/lib/Analysis/AliasAnalysisEvaluator.cpp @@ -24,7 +24,7 @@ #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Assembly/Writer.h" #include "llvm/Support/InstIterator.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include #include diff --git a/lib/Analysis/CFGPrinter.cpp b/lib/Analysis/CFGPrinter.cpp index 9eaaec690b8..88f9843c0be 100644 --- a/lib/Analysis/CFGPrinter.cpp +++ b/lib/Analysis/CFGPrinter.cpp @@ -23,7 +23,7 @@ #include "llvm/Analysis/CFGPrinter.h" #include "llvm/Assembly/Writer.h" #include "llvm/Support/CFG.h" -#include "Support/GraphWriter.h" +#include "llvm/Support/GraphWriter.h" #include #include using namespace llvm; diff --git a/lib/Analysis/DataStructure/BottomUpClosure.cpp b/lib/Analysis/DataStructure/BottomUpClosure.cpp index 9f2124a1bb5..4bc6fafcf63 100644 --- a/lib/Analysis/DataStructure/BottomUpClosure.cpp +++ b/lib/Analysis/DataStructure/BottomUpClosure.cpp @@ -16,8 +16,8 @@ #include "llvm/Analysis/DataStructure/DataStructure.h" #include "llvm/Module.h" -#include "Support/Statistic.h" -#include "Support/Debug.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/Support/Debug.h" #include "DSCallSiteIterator.h" using namespace llvm; diff --git a/lib/Analysis/DataStructure/CompleteBottomUp.cpp b/lib/Analysis/DataStructure/CompleteBottomUp.cpp index 589891f557f..b2a0f4ba9b8 100644 --- a/lib/Analysis/DataStructure/CompleteBottomUp.cpp +++ b/lib/Analysis/DataStructure/CompleteBottomUp.cpp @@ -16,10 +16,10 @@ #include "llvm/Analysis/DataStructure/DataStructure.h" #include "llvm/Module.h" #include "llvm/Analysis/DataStructure/DSGraph.h" -#include "Support/Debug.h" -#include "Support/SCCIterator.h" -#include "Support/Statistic.h" -#include "Support/STLExtras.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/SCCIterator.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" using namespace llvm; namespace { diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index 83aa890d96f..de34265f2ab 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -18,12 +18,12 @@ #include "llvm/DerivedTypes.h" #include "llvm/Target/TargetData.h" #include "llvm/Assembly/Writer.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/DepthFirstIterator.h" -#include "Support/STLExtras.h" -#include "Support/Statistic.h" -#include "Support/Timer.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/Support/Timer.h" #include using namespace llvm; diff --git a/lib/Analysis/DataStructure/DataStructureOpt.cpp b/lib/Analysis/DataStructure/DataStructureOpt.cpp index 6c2e5df3a77..f7a1ed9af3f 100644 --- a/lib/Analysis/DataStructure/DataStructureOpt.cpp +++ b/lib/Analysis/DataStructure/DataStructureOpt.cpp @@ -16,7 +16,7 @@ #include "llvm/Analysis/DataStructure/DSGraph.h" #include "llvm/Module.h" #include "llvm/Constant.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Analysis/DataStructure/DataStructureStats.cpp b/lib/Analysis/DataStructure/DataStructureStats.cpp index 1bfe09aba51..7e3f85f3a69 100644 --- a/lib/Analysis/DataStructure/DataStructureStats.cpp +++ b/lib/Analysis/DataStructure/DataStructureStats.cpp @@ -17,7 +17,7 @@ #include "llvm/Instructions.h" #include "llvm/Pass.h" #include "llvm/Support/InstVisitor.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; diff --git a/lib/Analysis/DataStructure/DependenceGraph.h b/lib/Analysis/DataStructure/DependenceGraph.h index 679ecd7d135..520b0085282 100644 --- a/lib/Analysis/DataStructure/DependenceGraph.h +++ b/lib/Analysis/DataStructure/DependenceGraph.h @@ -24,7 +24,7 @@ #ifndef LLVM_ANALYSIS_DEPENDENCEGRAPH_H #define LLVM_ANALYSIS_DEPENDENCEGRAPH_H -#include "Support/hash_map" +#include "llvm/ADT/hash_map" #include #include #include diff --git a/lib/Analysis/DataStructure/GraphChecker.cpp b/lib/Analysis/DataStructure/GraphChecker.cpp index 5cb37bb23e3..8cef6b37bf1 100644 --- a/lib/Analysis/DataStructure/GraphChecker.cpp +++ b/lib/Analysis/DataStructure/GraphChecker.cpp @@ -25,7 +25,7 @@ #include "llvm/Analysis/DataStructure/DataStructure.h" #include "llvm/Analysis/DataStructure/DSGraph.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Value.h" #include #include diff --git a/lib/Analysis/DataStructure/IPModRef.cpp b/lib/Analysis/DataStructure/IPModRef.cpp index bf1940ebe64..ccc15f74e49 100644 --- a/lib/Analysis/DataStructure/IPModRef.cpp +++ b/lib/Analysis/DataStructure/IPModRef.cpp @@ -16,9 +16,9 @@ #include "llvm/Analysis/DataStructure/DSGraph.h" #include "llvm/Module.h" #include "llvm/Instructions.h" -#include "Support/Statistic.h" -#include "Support/STLExtras.h" -#include "Support/StringExtras.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/StringExtras.h" #include namespace llvm { diff --git a/lib/Analysis/DataStructure/IPModRef.h b/lib/Analysis/DataStructure/IPModRef.h index 57649da7239..4a825dbea3a 100644 --- a/lib/Analysis/DataStructure/IPModRef.h +++ b/lib/Analysis/DataStructure/IPModRef.h @@ -47,8 +47,8 @@ #define LLVM_ANALYSIS_IPMODREF_H #include "llvm/Pass.h" -#include "Support/BitSetVector.h" -#include "Support/hash_map" +#include "llvm/ADT/BitSetVector.h" +#include "llvm/ADT/hash_map" namespace llvm { diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index 34c56dc2ea7..b21f2f10243 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/lib/Analysis/DataStructure/Local.cpp @@ -21,9 +21,9 @@ #include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/Support/InstVisitor.h" #include "llvm/Target/TargetData.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/Timer.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/Timer.h" // FIXME: This should eventually be a FunctionPass that is automatically // aggregated into a Pass. diff --git a/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp b/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp index 7c39365d06c..49b6425930d 100644 --- a/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp +++ b/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp @@ -25,11 +25,11 @@ #include "llvm/Analysis/DataStructure/DSGraph.h" #include "llvm/Support/InstVisitor.h" #include "llvm/Support/CFG.h" -#include "Support/SCCIterator.h" -#include "Support/Statistic.h" -#include "Support/STLExtras.h" -#include "Support/hash_map" -#include "Support/hash_set" +#include "llvm/ADT/SCCIterator.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/hash_map" +#include "llvm/ADT/hash_set" namespace llvm { diff --git a/lib/Analysis/DataStructure/MemoryDepAnalysis.h b/lib/Analysis/DataStructure/MemoryDepAnalysis.h index 04d78dafff8..570a03b679d 100644 --- a/lib/Analysis/DataStructure/MemoryDepAnalysis.h +++ b/lib/Analysis/DataStructure/MemoryDepAnalysis.h @@ -22,7 +22,7 @@ #include "DependenceGraph.h" #include "llvm/Pass.h" -#include "Support/hash_map" +#include "llvm/ADT/hash_map" namespace llvm { diff --git a/lib/Analysis/DataStructure/Parallelize.cpp b/lib/Analysis/DataStructure/Parallelize.cpp index c944b8cc20d..3dcb05ee064 100644 --- a/lib/Analysis/DataStructure/Parallelize.cpp +++ b/lib/Analysis/DataStructure/Parallelize.cpp @@ -46,10 +46,10 @@ #include "llvm/Analysis/DataStructure/DSGraph.h" #include "llvm/Support/InstVisitor.h" #include "llvm/Transforms/Utils/Local.h" -#include "Support/Statistic.h" -#include "Support/STLExtras.h" -#include "Support/hash_set" -#include "Support/hash_map" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/hash_set" +#include "llvm/ADT/hash_map" #include #include using namespace llvm; diff --git a/lib/Analysis/DataStructure/PgmDependenceGraph.h b/lib/Analysis/DataStructure/PgmDependenceGraph.h index 5f7f7d581b9..ec6f927a7e6 100644 --- a/lib/Analysis/DataStructure/PgmDependenceGraph.h +++ b/lib/Analysis/DataStructure/PgmDependenceGraph.h @@ -43,7 +43,7 @@ /* #include "llvm/Analysis/PostDominators.h" -- see below */ #include "llvm/Instruction.h" #include "llvm/Pass.h" -#include "Support/iterator" +#include "llvm/ADT/iterator" namespace llvm { diff --git a/lib/Analysis/DataStructure/Printer.cpp b/lib/Analysis/DataStructure/Printer.cpp index 24bf7683798..c951433f49a 100644 --- a/lib/Analysis/DataStructure/Printer.cpp +++ b/lib/Analysis/DataStructure/Printer.cpp @@ -17,9 +17,9 @@ #include "llvm/Module.h" #include "llvm/Constants.h" #include "llvm/Assembly/Writer.h" -#include "Support/CommandLine.h" -#include "Support/GraphWriter.h" -#include "Support/Statistic.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/GraphWriter.h" +#include "llvm/ADT/Statistic.h" #include #include using namespace llvm; diff --git a/lib/Analysis/DataStructure/Steensgaard.cpp b/lib/Analysis/DataStructure/Steensgaard.cpp index 55a6deb048f..deeb8b34509 100644 --- a/lib/Analysis/DataStructure/Steensgaard.cpp +++ b/lib/Analysis/DataStructure/Steensgaard.cpp @@ -18,7 +18,7 @@ #include "llvm/Analysis/DataStructure/DSGraph.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Module.h" -#include "Support/Debug.h" +#include "llvm/Support/Debug.h" using namespace llvm; namespace { diff --git a/lib/Analysis/DataStructure/TopDownClosure.cpp b/lib/Analysis/DataStructure/TopDownClosure.cpp index 4635787a041..1d861e8216e 100644 --- a/lib/Analysis/DataStructure/TopDownClosure.cpp +++ b/lib/Analysis/DataStructure/TopDownClosure.cpp @@ -18,8 +18,8 @@ #include "llvm/Module.h" #include "llvm/DerivedTypes.h" #include "llvm/Analysis/DataStructure/DSGraph.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp index 54dfd7458d1..7901c91abb3 100644 --- a/lib/Analysis/IPA/Andersens.cpp +++ b/lib/Analysis/IPA/Andersens.cpp @@ -58,8 +58,8 @@ #include "llvm/Support/InstIterator.h" #include "llvm/Support/InstVisitor.h" #include "llvm/Analysis/AliasAnalysis.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp index 8025ab2d9ac..75e068ba54c 100644 --- a/lib/Analysis/IPA/CallGraph.cpp +++ b/lib/Analysis/IPA/CallGraph.cpp @@ -16,7 +16,7 @@ #include "llvm/Module.h" #include "llvm/Instructions.h" #include "llvm/Support/CallSite.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/STLExtras.h" #include using namespace llvm; diff --git a/lib/Analysis/IPA/CallGraphSCCPass.cpp b/lib/Analysis/IPA/CallGraphSCCPass.cpp index f4e2efbe1c1..f7d7ab126a3 100644 --- a/lib/Analysis/IPA/CallGraphSCCPass.cpp +++ b/lib/Analysis/IPA/CallGraphSCCPass.cpp @@ -17,7 +17,7 @@ #include "llvm/CallGraphSCCPass.h" #include "llvm/Analysis/CallGraph.h" -#include "Support/SCCIterator.h" +#include "llvm/ADT/SCCIterator.h" using namespace llvm; /// getAnalysisUsage - For this class, we declare that we require and preserve diff --git a/lib/Analysis/IPA/FindUnsafePointerTypes.cpp b/lib/Analysis/IPA/FindUnsafePointerTypes.cpp index 52a83a1dfd5..23ee99aa59c 100644 --- a/lib/Analysis/IPA/FindUnsafePointerTypes.cpp +++ b/lib/Analysis/IPA/FindUnsafePointerTypes.cpp @@ -28,7 +28,7 @@ #include "llvm/DerivedTypes.h" #include "llvm/Module.h" #include "llvm/Support/InstIterator.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" using namespace llvm; static RegisterAnalysis diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp index 219fdbf649b..c1f15ed2385 100644 --- a/lib/Analysis/IPA/GlobalsModRef.cpp +++ b/lib/Analysis/IPA/GlobalsModRef.cpp @@ -22,9 +22,9 @@ #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/CallGraph.h" #include "llvm/Support/InstIterator.h" -#include "Support/CommandLine.h" -#include "Support/Statistic.h" -#include "Support/SCCIterator.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/SCCIterator.h" #include using namespace llvm; diff --git a/lib/Analysis/IPA/PrintSCC.cpp b/lib/Analysis/IPA/PrintSCC.cpp index 8911cc36e22..e4af831752c 100644 --- a/lib/Analysis/IPA/PrintSCC.cpp +++ b/lib/Analysis/IPA/PrintSCC.cpp @@ -29,7 +29,7 @@ #include "llvm/Module.h" #include "llvm/Analysis/CallGraph.h" #include "llvm/Support/CFG.h" -#include "Support/SCCIterator.h" +#include "llvm/ADT/SCCIterator.h" #include namespace llvm { diff --git a/lib/Analysis/InstCount.cpp b/lib/Analysis/InstCount.cpp index 9177e448000..12d16b081e7 100644 --- a/lib/Analysis/InstCount.cpp +++ b/lib/Analysis/InstCount.cpp @@ -14,7 +14,7 @@ #include "llvm/Pass.h" #include "llvm/Function.h" #include "llvm/Support/InstVisitor.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" namespace llvm { diff --git a/lib/Analysis/IntervalPartition.cpp b/lib/Analysis/IntervalPartition.cpp index 12c196f2f70..9253f721ab1 100644 --- a/lib/Analysis/IntervalPartition.cpp +++ b/lib/Analysis/IntervalPartition.cpp @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/IntervalIterator.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/STLExtras.h" namespace llvm { diff --git a/lib/Analysis/LoopInfo.cpp b/lib/Analysis/LoopInfo.cpp index 131d02a32b8..710f74afe2d 100644 --- a/lib/Analysis/LoopInfo.cpp +++ b/lib/Analysis/LoopInfo.cpp @@ -20,7 +20,7 @@ #include "llvm/Analysis/Dominators.h" #include "llvm/Assembly/Writer.h" #include "llvm/Support/CFG.h" -#include "Support/DepthFirstIterator.h" +#include "llvm/ADT/DepthFirstIterator.h" #include #include diff --git a/lib/Analysis/PostDominators.cpp b/lib/Analysis/PostDominators.cpp index ff202f0151d..e5908c496b4 100644 --- a/lib/Analysis/PostDominators.cpp +++ b/lib/Analysis/PostDominators.cpp @@ -14,8 +14,8 @@ #include "llvm/Analysis/PostDominators.h" #include "llvm/Instructions.h" #include "llvm/Support/CFG.h" -#include "Support/DepthFirstIterator.h" -#include "Support/SetOperations.h" +#include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/SetOperations.h" using namespace llvm; //===----------------------------------------------------------------------===// diff --git a/lib/Analysis/ProfileInfoLoaderPass.cpp b/lib/Analysis/ProfileInfoLoaderPass.cpp index 4ab56ce1569..cd3f5753559 100644 --- a/lib/Analysis/ProfileInfoLoaderPass.cpp +++ b/lib/Analysis/ProfileInfoLoaderPass.cpp @@ -17,7 +17,7 @@ #include "llvm/Pass.h" #include "llvm/Analysis/ProfileInfo.h" #include "llvm/Analysis/ProfileInfoLoader.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include using namespace llvm; diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index cac3b507ba1..efe4d92bff8 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -72,8 +72,8 @@ #include "llvm/Support/CFG.h" #include "llvm/Support/ConstantRange.h" #include "llvm/Support/InstIterator.h" -#include "Support/CommandLine.h" -#include "Support/Statistic.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; diff --git a/lib/Archive/ArchiveReader.cpp b/lib/Archive/ArchiveReader.cpp index 1d8530fc785..50e11d6ab58 100644 --- a/lib/Archive/ArchiveReader.cpp +++ b/lib/Archive/ArchiveReader.cpp @@ -18,7 +18,7 @@ #include "llvm/Bytecode/Reader.h" #include "llvm/Module.h" -#include "Support/FileUtilities.h" +#include "llvm/Support/FileUtilities.h" #include #include using namespace llvm; diff --git a/lib/AsmParser/ParserInternals.h b/lib/AsmParser/ParserInternals.h index 71876a55b46..9fdc8e66f8b 100644 --- a/lib/AsmParser/ParserInternals.h +++ b/lib/AsmParser/ParserInternals.h @@ -20,7 +20,7 @@ #include "llvm/Function.h" #include "llvm/Instructions.h" #include "llvm/Assembly/Parser.h" -#include "Support/StringExtras.h" +#include "llvm/ADT/StringExtras.h" // Global variables exported from the lexer... extern std::FILE *llvmAsmin; diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index 8ba89bc879c..1fd8782daea 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -17,7 +17,7 @@ #include "llvm/Module.h" #include "llvm/SymbolTable.h" #include "llvm/Support/GetElementPtrTypeIterator.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/STLExtras.h" #include #include #include diff --git a/lib/Bytecode/Archive/ArchiveReader.cpp b/lib/Bytecode/Archive/ArchiveReader.cpp index 1d8530fc785..50e11d6ab58 100644 --- a/lib/Bytecode/Archive/ArchiveReader.cpp +++ b/lib/Bytecode/Archive/ArchiveReader.cpp @@ -18,7 +18,7 @@ #include "llvm/Bytecode/Reader.h" #include "llvm/Module.h" -#include "Support/FileUtilities.h" +#include "llvm/Support/FileUtilities.h" #include #include using namespace llvm; diff --git a/lib/Bytecode/Reader/ArchiveReader.cpp b/lib/Bytecode/Reader/ArchiveReader.cpp index 1d8530fc785..50e11d6ab58 100644 --- a/lib/Bytecode/Reader/ArchiveReader.cpp +++ b/lib/Bytecode/Reader/ArchiveReader.cpp @@ -18,7 +18,7 @@ #include "llvm/Bytecode/Reader.h" #include "llvm/Module.h" -#include "Support/FileUtilities.h" +#include "llvm/Support/FileUtilities.h" #include #include using namespace llvm; diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp index f0b39d45de9..39f238c9869 100644 --- a/lib/Bytecode/Reader/Reader.cpp +++ b/lib/Bytecode/Reader/Reader.cpp @@ -24,7 +24,7 @@ #include "llvm/SymbolTable.h" #include "llvm/Bytecode/Format.h" #include "llvm/Support/GetElementPtrTypeIterator.h" -#include "Support/StringExtras.h" +#include "llvm/ADT/StringExtras.h" #include using namespace llvm; @@ -428,14 +428,20 @@ Value * BytecodeReader::getValue(unsigned type, unsigned oNum, bool Create) { if (!Create) return 0; // Do not create a placeholder? + // Did we already create a place holder? std::pair KeyValue(type, oNum); ForwardReferenceMap::iterator I = ForwardReferences.lower_bound(KeyValue); if (I != ForwardReferences.end() && I->first == KeyValue) return I->second; // We have already created this placeholder - Value *Val = new Argument(getType(type)); - ForwardReferences.insert(I, std::make_pair(KeyValue, Val)); - return Val; + // If the type exists (it should) + if (const Type* Ty = getType(type)) { + // Create the place holder + Value *Val = new Argument(Ty); + ForwardReferences.insert(I, std::make_pair(KeyValue, Val)); + return Val; + } + throw "Can't create placeholder for value of type slot #" + utostr(type); } /// This is just like getValue, but when a compaction table is in use, it diff --git a/lib/Bytecode/Reader/ReaderWrappers.cpp b/lib/Bytecode/Reader/ReaderWrappers.cpp index 2930a42c63d..383e53e9be4 100644 --- a/lib/Bytecode/Reader/ReaderWrappers.cpp +++ b/lib/Bytecode/Reader/ReaderWrappers.cpp @@ -17,9 +17,9 @@ #include "Reader.h" #include "llvm/Module.h" #include "llvm/Instructions.h" -#include "Support/FileUtilities.h" -#include "Support/StringExtras.h" -#include "Config/unistd.h" +#include "llvm/Support/FileUtilities.h" +#include "llvm/ADT/StringExtras.h" +#include "llvm/Config/unistd.h" #include using namespace llvm; diff --git a/lib/Bytecode/Writer/SlotCalculator.cpp b/lib/Bytecode/Writer/SlotCalculator.cpp index 2656edd8a54..d4145dbcdca 100644 --- a/lib/Bytecode/Writer/SlotCalculator.cpp +++ b/lib/Bytecode/Writer/SlotCalculator.cpp @@ -23,8 +23,8 @@ #include "llvm/SymbolTable.h" #include "llvm/Type.h" #include "llvm/Analysis/ConstantsScanner.h" -#include "Support/PostOrderIterator.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/PostOrderIterator.h" +#include "llvm/ADT/STLExtras.h" #include #include diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp index 7db21486034..60a48cc2654 100644 --- a/lib/Bytecode/Writer/Writer.cpp +++ b/lib/Bytecode/Writer/Writer.cpp @@ -25,8 +25,8 @@ #include "llvm/Module.h" #include "llvm/SymbolTable.h" #include "llvm/Support/GetElementPtrTypeIterator.h" -#include "Support/STLExtras.h" -#include "Support/Statistic.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/Statistic.h" #include #include using namespace llvm; diff --git a/lib/Bytecode/Writer/WriterInternals.h b/lib/Bytecode/Writer/WriterInternals.h index e496da9ff8f..8b5f99e94d3 100644 --- a/lib/Bytecode/Writer/WriterInternals.h +++ b/lib/Bytecode/Writer/WriterInternals.h @@ -23,7 +23,7 @@ #include "llvm/Bytecode/Writer.h" #include "llvm/Bytecode/Format.h" #include "llvm/Instruction.h" -#include "Support/DataTypes.h" +#include "llvm/Support/DataTypes.h" #include #include diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp index af2b7250173..cca9f93553c 100644 --- a/lib/CodeGen/BranchFolding.cpp +++ b/lib/CodeGen/BranchFolding.cpp @@ -20,7 +20,7 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/STLExtras.h" using namespace llvm; namespace { diff --git a/lib/CodeGen/InstrSched/InstrScheduling.cpp b/lib/CodeGen/InstrSched/InstrScheduling.cpp index fc4d6a7164d..69ecb90f31d 100644 --- a/lib/CodeGen/InstrSched/InstrScheduling.cpp +++ b/lib/CodeGen/InstrSched/InstrScheduling.cpp @@ -20,7 +20,7 @@ #include "../../Target/SparcV9/MachineCodeForInstruction.h" #include "../../Target/SparcV9/LiveVar/FunctionLiveVarInfo.h" #include "../../Target/SparcV9/SparcV9InstrInfo.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include #include diff --git a/lib/CodeGen/InstrSched/SchedGraph.cpp b/lib/CodeGen/InstrSched/SchedGraph.cpp index e3b3cba5249..00b48d537d3 100644 --- a/lib/CodeGen/InstrSched/SchedGraph.cpp +++ b/lib/CodeGen/InstrSched/SchedGraph.cpp @@ -22,7 +22,7 @@ #include "../../Target/SparcV9/MachineCodeForInstruction.h" #include "../../Target/SparcV9/SparcV9RegInfo.h" #include "../../Target/SparcV9/SparcV9InstrInfo.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/STLExtras.h" #include namespace llvm { diff --git a/lib/CodeGen/InstrSched/SchedGraph.h b/lib/CodeGen/InstrSched/SchedGraph.h index e327598bd57..53ded6377d0 100644 --- a/lib/CodeGen/InstrSched/SchedGraph.h +++ b/lib/CodeGen/InstrSched/SchedGraph.h @@ -22,8 +22,8 @@ #include "llvm/CodeGen/SchedGraphCommon.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Transforms/Scalar.h" -#include "Support/hash_map" -#include "Support/GraphTraits.h" +#include "llvm/ADT/hash_map" +#include "llvm/ADT/GraphTraits.h" namespace llvm { diff --git a/lib/CodeGen/InstrSched/SchedGraphCommon.cpp b/lib/CodeGen/InstrSched/SchedGraphCommon.cpp index da4492f359d..0ad5f5844e7 100644 --- a/lib/CodeGen/InstrSched/SchedGraphCommon.cpp +++ b/lib/CodeGen/InstrSched/SchedGraphCommon.cpp @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// #include "llvm/CodeGen/SchedGraphCommon.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/STLExtras.h" #include namespace llvm { diff --git a/lib/CodeGen/InstrSched/SchedPriorities.cpp b/lib/CodeGen/InstrSched/SchedPriorities.cpp index 3c0e0b2c33c..0aaece228d8 100644 --- a/lib/CodeGen/InstrSched/SchedPriorities.cpp +++ b/lib/CodeGen/InstrSched/SchedPriorities.cpp @@ -21,7 +21,7 @@ #include "../../Target/SparcV9/LiveVar/FunctionLiveVarInfo.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/Support/CFG.h" -#include "Support/PostOrderIterator.h" +#include "llvm/ADT/PostOrderIterator.h" #include namespace llvm { diff --git a/lib/CodeGen/InstrSched/SchedPriorities.h b/lib/CodeGen/InstrSched/SchedPriorities.h index 74704678066..dd807f788e3 100644 --- a/lib/CodeGen/InstrSched/SchedPriorities.h +++ b/lib/CodeGen/InstrSched/SchedPriorities.h @@ -23,7 +23,7 @@ #include "SchedGraph.h" #include "llvm/CodeGen/InstrScheduling.h" #include "llvm/Target/TargetSchedInfo.h" -#include "Support/hash_set" +#include "llvm/ADT/hash_set" #include namespace llvm { diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp index 6bd441f6431..d63cfc60fba 100644 --- a/lib/CodeGen/LiveInterval.cpp +++ b/lib/CodeGen/LiveInterval.cpp @@ -19,7 +19,7 @@ //===----------------------------------------------------------------------===// #include "LiveInterval.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/STLExtras.h" #include #include using namespace llvm; diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 3c234bbd0e1..95ed508fcb3 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -27,10 +27,10 @@ #include "llvm/Target/MRegisterInfo.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" -#include "Support/STLExtras.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" #include "VirtRegMap.h" #include diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp index 630477d7b65..825b56d784a 100644 --- a/lib/CodeGen/LiveVariables.cpp +++ b/lib/CodeGen/LiveVariables.cpp @@ -31,8 +31,8 @@ #include "llvm/Target/MRegisterInfo.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" -#include "Support/DepthFirstIterator.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/STLExtras.h" using namespace llvm; static RegisterAnalysis X("livevars", "Live Variable Analysis"); diff --git a/lib/CodeGen/MachineBasicBlock.cpp b/lib/CodeGen/MachineBasicBlock.cpp index 20390a2f50e..f018f9f01f8 100644 --- a/lib/CodeGen/MachineBasicBlock.cpp +++ b/lib/CodeGen/MachineBasicBlock.cpp @@ -17,7 +17,7 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" -#include "Support/LeakDetector.h" +#include "llvm/Support/LeakDetector.h" #include using namespace llvm; diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index 3478e30e1f7..e38e00603a4 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -23,8 +23,8 @@ #include "llvm/Target/TargetFrameInfo.h" #include "llvm/Function.h" #include "llvm/Instructions.h" -#include "Support/LeakDetector.h" -#include "Support/GraphWriter.h" +#include "llvm/Support/LeakDetector.h" +#include "llvm/Support/GraphWriter.h" #include #include #include diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 7c5a61ecd1d..a4ae09a6490 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -20,7 +20,7 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/MRegisterInfo.h" -#include "Support/LeakDetector.h" +#include "llvm/Support/LeakDetector.h" #include using namespace llvm; diff --git a/lib/CodeGen/ModuloScheduling/MSSchedule.cpp b/lib/CodeGen/ModuloScheduling/MSSchedule.cpp index c57cb5a3bdb..b8bbccf8be2 100644 --- a/lib/CodeGen/ModuloScheduling/MSSchedule.cpp +++ b/lib/CodeGen/ModuloScheduling/MSSchedule.cpp @@ -13,7 +13,7 @@ #define DEBUG_TYPE "ModuloSched" #include "MSSchedule.h" -#include "Support/Debug.h" +#include "llvm/Support/Debug.h" #include "llvm/Target/TargetSchedInfo.h" using namespace llvm; diff --git a/lib/CodeGen/ModuloScheduling/MSchedGraph.cpp b/lib/CodeGen/ModuloScheduling/MSchedGraph.cpp index 6bee44d934a..5bdcc9afcf2 100644 --- a/lib/CodeGen/ModuloScheduling/MSchedGraph.cpp +++ b/lib/CodeGen/ModuloScheduling/MSchedGraph.cpp @@ -16,7 +16,7 @@ #include "../../Target/SparcV9/SparcV9RegisterInfo.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/Target/TargetInstrInfo.h" -#include "Support/Debug.h" +#include "llvm/Support/Debug.h" #include using namespace llvm; diff --git a/lib/CodeGen/ModuloScheduling/MSchedGraph.h b/lib/CodeGen/ModuloScheduling/MSchedGraph.h index 0dcbb496f19..4ea572a380b 100644 --- a/lib/CodeGen/ModuloScheduling/MSchedGraph.h +++ b/lib/CodeGen/ModuloScheduling/MSchedGraph.h @@ -16,9 +16,9 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Target/TargetMachine.h" -#include "Support/GraphTraits.h" -#include "Support/STLExtras.h" -#include "Support/iterator" +#include "llvm/ADT/GraphTraits.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/iterator" #include namespace llvm { diff --git a/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp b/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp index dadc38570c6..9ad1e4ce4bd 100644 --- a/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp +++ b/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp @@ -21,9 +21,9 @@ #include "llvm/CodeGen/Passes.h" #include "llvm/Support/CFG.h" #include "llvm/Target/TargetSchedInfo.h" -#include "Support/Debug.h" -#include "Support/GraphWriter.h" -#include "Support/StringExtras.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/GraphWriter.h" +#include "llvm/ADT/StringExtras.h" #include #include #include diff --git a/lib/CodeGen/PHIElimination.cpp b/lib/CodeGen/PHIElimination.cpp index 4df9a92bb45..0010ccd7e66 100644 --- a/lib/CodeGen/PHIElimination.cpp +++ b/lib/CodeGen/PHIElimination.cpp @@ -20,8 +20,8 @@ #include "llvm/CodeGen/LiveVariables.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" -#include "Support/DenseMap.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/STLExtras.h" using namespace llvm; namespace { diff --git a/lib/CodeGen/Passes.cpp b/lib/CodeGen/Passes.cpp index 7233e81473b..4d2f111b2ed 100644 --- a/lib/CodeGen/Passes.cpp +++ b/lib/CodeGen/Passes.cpp @@ -13,7 +13,7 @@ //===---------------------------------------------------------------------===// #include "llvm/CodeGen/Passes.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include using namespace llvm; diff --git a/lib/CodeGen/RegAllocIterativeScan.cpp b/lib/CodeGen/RegAllocIterativeScan.cpp index ffeb68d9dda..26fa7b7655b 100644 --- a/lib/CodeGen/RegAllocIterativeScan.cpp +++ b/lib/CodeGen/RegAllocIterativeScan.cpp @@ -25,9 +25,9 @@ #include "llvm/CodeGen/SSARegMap.h" #include "llvm/Target/MRegisterInfo.h" #include "llvm/Target/TargetMachine.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" -#include "Support/STLExtras.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" #include "LiveIntervalAnalysis.h" #include "PhysRegTracker.h" #include "VirtRegMap.h" diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index 181f061986a..8736a236755 100644 --- a/lib/CodeGen/RegAllocLinearScan.cpp +++ b/lib/CodeGen/RegAllocLinearScan.cpp @@ -19,9 +19,9 @@ #include "llvm/CodeGen/SSARegMap.h" #include "llvm/Target/MRegisterInfo.h" #include "llvm/Target/TargetMachine.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" -#include "Support/STLExtras.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" #include "LiveIntervalAnalysis.h" #include "PhysRegTracker.h" #include "VirtRegMap.h" diff --git a/lib/CodeGen/RegAllocLocal.cpp b/lib/CodeGen/RegAllocLocal.cpp index 482325fbff7..2cf8e6327e4 100644 --- a/lib/CodeGen/RegAllocLocal.cpp +++ b/lib/CodeGen/RegAllocLocal.cpp @@ -21,10 +21,10 @@ #include "llvm/CodeGen/LiveVariables.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/DenseMap.h" -#include "Support/Statistic.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/CodeGen/RegAllocSimple.cpp b/lib/CodeGen/RegAllocSimple.cpp index 6f6c2c6352e..ba05bd38309 100644 --- a/lib/CodeGen/RegAllocSimple.cpp +++ b/lib/CodeGen/RegAllocSimple.cpp @@ -22,9 +22,9 @@ #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" -#include "Support/STLExtras.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" using namespace llvm; namespace { diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp index 0268d4b01a5..e3e79f01f5c 100644 --- a/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -37,9 +37,9 @@ #include "llvm/Target/MRegisterInfo.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" -#include "Support/STLExtras.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" using namespace llvm; namespace { diff --git a/lib/CodeGen/UnreachableBlockElim.cpp b/lib/CodeGen/UnreachableBlockElim.cpp index 27355ec6d3d..0bde9ff23a2 100644 --- a/lib/CodeGen/UnreachableBlockElim.cpp +++ b/lib/CodeGen/UnreachableBlockElim.cpp @@ -26,7 +26,7 @@ #include "llvm/Function.h" #include "llvm/Pass.h" #include "llvm/Support/CFG.h" -#include "Support/DepthFirstIterator.h" +#include "llvm/ADT/DepthFirstIterator.h" using namespace llvm; namespace { diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp index c235aada9f4..cffe77c5180 100644 --- a/lib/CodeGen/VirtRegMap.cpp +++ b/lib/CodeGen/VirtRegMap.cpp @@ -22,11 +22,11 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetInstrInfo.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/DenseMap.h" -#include "Support/Statistic.h" -#include "Support/STLExtras.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" using namespace llvm; diff --git a/lib/CodeGen/VirtRegMap.h b/lib/CodeGen/VirtRegMap.h index c76a222341e..fb694d5e1a8 100644 --- a/lib/CodeGen/VirtRegMap.h +++ b/lib/CodeGen/VirtRegMap.h @@ -20,7 +20,7 @@ #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/SSARegMap.h" -#include "Support/DenseMap.h" +#include "llvm/ADT/DenseMap.h" #include #include diff --git a/lib/Debugger/Debugger.cpp b/lib/Debugger/Debugger.cpp index 02c4a8a4916..76cdfa20148 100644 --- a/lib/Debugger/Debugger.cpp +++ b/lib/Debugger/Debugger.cpp @@ -16,7 +16,7 @@ #include "llvm/ModuleProvider.h" #include "llvm/Bytecode/Reader.h" #include "llvm/Debugger/InferiorProcess.h" -#include "Support/StringExtras.h" +#include "llvm/ADT/StringExtras.h" using namespace llvm; /// Debugger constructor - Initialize the debugger to its initial, empty, state. diff --git a/lib/Debugger/ProgramInfo.cpp b/lib/Debugger/ProgramInfo.cpp index 8bb8738c657..d6a4532b4f5 100644 --- a/lib/Debugger/ProgramInfo.cpp +++ b/lib/Debugger/ProgramInfo.cpp @@ -20,9 +20,9 @@ #include "llvm/Module.h" #include "llvm/Debugger/SourceFile.h" #include "llvm/Debugger/SourceLanguage.h" -#include "Support/FileUtilities.h" -#include "Support/SlowOperationInformer.h" -#include "Support/STLExtras.h" +#include "llvm/Support/FileUtilities.h" +#include "llvm/Support/SlowOperationInformer.h" +#include "llvm/ADT/STLExtras.h" #include using namespace llvm; diff --git a/lib/Debugger/SourceFile.cpp b/lib/Debugger/SourceFile.cpp index 2eb3b5750b1..f0bd0d8a221 100644 --- a/lib/Debugger/SourceFile.cpp +++ b/lib/Debugger/SourceFile.cpp @@ -12,8 +12,8 @@ //===----------------------------------------------------------------------===// #include "llvm/Debugger/SourceFile.h" -#include "Support/SlowOperationInformer.h" -#include "Support/FileUtilities.h" +#include "llvm/Support/SlowOperationInformer.h" +#include "llvm/Support/FileUtilities.h" #include #include #include diff --git a/lib/Debugger/UnixLocalInferiorProcess.cpp b/lib/Debugger/UnixLocalInferiorProcess.cpp index 1cacb534a27..437b21864ed 100644 --- a/lib/Debugger/UnixLocalInferiorProcess.cpp +++ b/lib/Debugger/UnixLocalInferiorProcess.cpp @@ -32,8 +32,8 @@ #include "llvm/CodeGen/IntrinsicLowering.h" #include "llvm/ExecutionEngine/GenericValue.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" -#include "Support/FileUtilities.h" -#include "Support/StringExtras.h" +#include "llvm/Support/FileUtilities.h" +#include "llvm/ADT/StringExtras.h" #include #include #include // Unix-specific debugger support diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index 105c0b8a1d9..b239cc2a53e 100644 --- a/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/lib/ExecutionEngine/ExecutionEngine.cpp @@ -23,9 +23,9 @@ #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/GenericValue.h" #include "llvm/Target/TargetData.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" -#include "Support/DynamicLinker.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/Support/DynamicLinker.h" using namespace llvm; namespace { diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp index 705fc16db8e..5e1ae0629f8 100644 --- a/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -18,8 +18,8 @@ #include "llvm/Instructions.h" #include "llvm/CodeGen/IntrinsicLowering.h" #include "llvm/Support/GetElementPtrTypeIterator.h" -#include "Support/Statistic.h" -#include "Support/Debug.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/Support/Debug.h" #include // For fmod using namespace llvm; diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index 83da7551b0a..def406a4b70 100644 --- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -23,7 +23,7 @@ #include "llvm/DerivedTypes.h" #include "llvm/Module.h" #include "llvm/Target/TargetData.h" -#include "Support/DynamicLinker.h" +#include "llvm/Support/DynamicLinker.h" #include #include #include diff --git a/lib/ExecutionEngine/Interpreter/Interpreter.h b/lib/ExecutionEngine/Interpreter/Interpreter.h index 99e417c4a84..d6e590d7357 100644 --- a/lib/ExecutionEngine/Interpreter/Interpreter.h +++ b/lib/ExecutionEngine/Interpreter/Interpreter.h @@ -20,7 +20,7 @@ #include "llvm/Support/InstVisitor.h" #include "llvm/Support/CallSite.h" #include "llvm/Target/TargetData.h" -#include "Support/DataTypes.h" +#include "llvm/Support/DataTypes.h" #include namespace llvm { diff --git a/lib/ExecutionEngine/JIT/Intercept.cpp b/lib/ExecutionEngine/JIT/Intercept.cpp index 8ed94471596..2eafb75cd0e 100644 --- a/lib/ExecutionEngine/JIT/Intercept.cpp +++ b/lib/ExecutionEngine/JIT/Intercept.cpp @@ -16,7 +16,7 @@ //===----------------------------------------------------------------------===// #include "JIT.h" -#include "Support/DynamicLinker.h" +#include "llvm/Support/DynamicLinker.h" #include #include using namespace llvm; diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp index 675ef479d11..311ec4b47db 100644 --- a/lib/ExecutionEngine/JIT/JIT.cpp +++ b/lib/ExecutionEngine/JIT/JIT.cpp @@ -24,7 +24,7 @@ #include "llvm/ExecutionEngine/GenericValue.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetJITInfo.h" -#include "Support/DynamicLinker.h" +#include "llvm/Support/DynamicLinker.h" #include using namespace llvm; diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp index 7065c56a466..5758ebc432a 100644 --- a/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -20,9 +20,9 @@ #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/Target/TargetData.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" -#include "Support/SystemUtils.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/Support/SystemUtils.h" using namespace llvm; namespace { diff --git a/lib/Linker/LinkArchives.cpp b/lib/Linker/LinkArchives.cpp index fcaa7af3d5f..fa9ec70306c 100644 --- a/lib/Linker/LinkArchives.cpp +++ b/lib/Linker/LinkArchives.cpp @@ -21,11 +21,11 @@ #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Support/Linker.h" -#include "Config/config.h" -#include "Support/CommandLine.h" -#include "Support/FileUtilities.h" +#include "llvm/Config/config.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/FileUtilities.h" #include "llvm/System/Signals.h" -#include "Support/SystemUtils.h" +#include "llvm/Support/SystemUtils.h" #include #include #include diff --git a/lib/Support/Annotation.cpp b/lib/Support/Annotation.cpp index 45fd06f92e2..c8cf8298b40 100644 --- a/lib/Support/Annotation.cpp +++ b/lib/Support/Annotation.cpp @@ -12,7 +12,7 @@ //===----------------------------------------------------------------------===// #include -#include "Support/Annotation.h" +#include "llvm/Support/Annotation.h" using namespace llvm; Annotation::~Annotation() {} // Designed to be subclassed diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index 3bc9cbf1ca8..d60b464dd5a 100644 --- a/lib/Support/CommandLine.cpp +++ b/lib/Support/CommandLine.cpp @@ -16,8 +16,8 @@ // //===----------------------------------------------------------------------===// -#include "Config/config.h" -#include "Support/CommandLine.h" +#include "llvm/Config/config.h" +#include "llvm/Support/CommandLine.h" #include #include #include diff --git a/lib/Support/Debug.cpp b/lib/Support/Debug.cpp index f1713429497..a58716763a7 100644 --- a/lib/Support/Debug.cpp +++ b/lib/Support/Debug.cpp @@ -23,8 +23,8 @@ // //===----------------------------------------------------------------------===// -#include "Support/Debug.h" -#include "Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/CommandLine.h" using namespace llvm; bool llvm::DebugFlag; // DebugFlag - Exported boolean set by the -debug option diff --git a/lib/Support/DynamicLinker.cpp b/lib/Support/DynamicLinker.cpp index 4ac58c1bbc0..a6593034c7e 100644 --- a/lib/Support/DynamicLinker.cpp +++ b/lib/Support/DynamicLinker.cpp @@ -18,9 +18,9 @@ // //===----------------------------------------------------------------------===// -#include "Support/DynamicLinker.h" -#include "Config/dlfcn.h" -#include "Config/windows.h" +#include "llvm/Support/DynamicLinker.h" +#include "llvm/Config/dlfcn.h" +#include "llvm/Config/windows.h" #include #include using namespace llvm; diff --git a/lib/Support/FileUtilities.cpp b/lib/Support/FileUtilities.cpp index 09542c3fabb..6829f155b8e 100644 --- a/lib/Support/FileUtilities.cpp +++ b/lib/Support/FileUtilities.cpp @@ -12,14 +12,14 @@ // //===----------------------------------------------------------------------===// -#include "Support/FileUtilities.h" -#include "Support/DataTypes.h" -#include "Config/unistd.h" -#include "Config/fcntl.h" -#include "Config/sys/types.h" -#include "Config/sys/stat.h" -#include "Config/sys/mman.h" -#include "Config/alloca.h" +#include "llvm/Support/FileUtilities.h" +#include "llvm/Support/DataTypes.h" +#include "llvm/Config/unistd.h" +#include "llvm/Config/fcntl.h" +#include "llvm/Config/sys/types.h" +#include "llvm/Config/sys/stat.h" +#include "llvm/Config/sys/mman.h" +#include "llvm/Config/alloca.h" #include #include #include diff --git a/lib/Support/IsInf.cpp b/lib/Support/IsInf.cpp index 7fd857e931b..c50eadff179 100644 --- a/lib/Support/IsInf.cpp +++ b/lib/Support/IsInf.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "Config/config.h" +#include "llvm/Config/config.h" #if HAVE_ISINF_IN_MATH_H # include #elif HAVE_ISINF_IN_CMATH diff --git a/lib/Support/IsNAN.cpp b/lib/Support/IsNAN.cpp index ade6bf1dc86..75c813f41aa 100644 --- a/lib/Support/IsNAN.cpp +++ b/lib/Support/IsNAN.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "Config/config.h" +#include "llvm/Config/config.h" #if HAVE_ISNAN_IN_MATH_H # include #elif HAVE_ISNAN_IN_CMATH diff --git a/lib/Support/PluginLoader.cpp b/lib/Support/PluginLoader.cpp index cbec6fa7d4d..2c13d578129 100644 --- a/lib/Support/PluginLoader.cpp +++ b/lib/Support/PluginLoader.cpp @@ -12,8 +12,8 @@ //===----------------------------------------------------------------------===// #define DONT_GET_PLUGIN_LOADER_OPTION -#include "Support/PluginLoader.h" -#include "Support/DynamicLinker.h" +#include "llvm/Support/PluginLoader.h" +#include "llvm/Support/DynamicLinker.h" #include using namespace llvm; diff --git a/lib/Support/SlowOperationInformer.cpp b/lib/Support/SlowOperationInformer.cpp index c245f3655c2..43faaadaae1 100644 --- a/lib/Support/SlowOperationInformer.cpp +++ b/lib/Support/SlowOperationInformer.cpp @@ -11,8 +11,8 @@ // //===----------------------------------------------------------------------===// -#include "Support/SlowOperationInformer.h" -#include "Config/config.h" // Get the signal handler return type +#include "llvm/Support/SlowOperationInformer.h" +#include "llvm/Config/config.h" // Get the signal handler return type #include #include #include diff --git a/lib/Support/Statistic.cpp b/lib/Support/Statistic.cpp index 7fa7547fee3..f4d9c7b9e24 100644 --- a/lib/Support/Statistic.cpp +++ b/lib/Support/Statistic.cpp @@ -21,8 +21,8 @@ // //===----------------------------------------------------------------------===// -#include "Support/Statistic.h" -#include "Support/CommandLine.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/Support/CommandLine.h" #include #include #include diff --git a/lib/Support/StringExtras.cpp b/lib/Support/StringExtras.cpp index 011ce280f05..e8d423a74da 100644 --- a/lib/Support/StringExtras.cpp +++ b/lib/Support/StringExtras.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "Support/StringExtras.h" +#include "llvm/ADT/StringExtras.h" using namespace llvm; /// getToken - This function extracts one token from source, ignoring any diff --git a/lib/Support/SystemUtils.cpp b/lib/Support/SystemUtils.cpp index b831f4096d0..3b529df79c7 100644 --- a/lib/Support/SystemUtils.cpp +++ b/lib/Support/SystemUtils.cpp @@ -13,15 +13,15 @@ //===----------------------------------------------------------------------===// #define _POSIX_MAPPED_FILES -#include "Support/SystemUtils.h" -#include "Config/fcntl.h" -#include "Config/pagesize.h" -#include "Config/unistd.h" -#include "Config/windows.h" -#include "Config/sys/mman.h" -#include "Config/sys/stat.h" -#include "Config/sys/types.h" -#include "Config/sys/wait.h" +#include "llvm/Support/SystemUtils.h" +#include "llvm/Config/fcntl.h" +#include "llvm/Config/pagesize.h" +#include "llvm/Config/unistd.h" +#include "llvm/Config/windows.h" +#include "llvm/Config/sys/mman.h" +#include "llvm/Config/sys/stat.h" +#include "llvm/Config/sys/types.h" +#include "llvm/Config/sys/wait.h" #include #include #include diff --git a/lib/Support/Timer.cpp b/lib/Support/Timer.cpp index 52b616fa2c4..ff3fd6fefe0 100644 --- a/lib/Support/Timer.cpp +++ b/lib/Support/Timer.cpp @@ -11,18 +11,18 @@ // //===----------------------------------------------------------------------===// -#include "Support/Timer.h" -#include "Support/CommandLine.h" +#include "llvm/Support/Timer.h" +#include "llvm/Support/CommandLine.h" #include #include #include #include #include -#include "Config/sys/resource.h" -#include "Config/sys/time.h" -#include "Config/unistd.h" -#include "Config/malloc.h" -#include "Config/windows.h" +#include "llvm/Config/sys/resource.h" +#include "llvm/Config/sys/time.h" +#include "llvm/Config/unistd.h" +#include "llvm/Config/malloc.h" +#include "llvm/Config/windows.h" using namespace llvm; // GetLibSupportInfoOutputFile - Return a file stream to print our output on. diff --git a/lib/Support/ToolRunner.cpp b/lib/Support/ToolRunner.cpp index b694127e076..3dc98451de5 100644 --- a/lib/Support/ToolRunner.cpp +++ b/lib/Support/ToolRunner.cpp @@ -13,9 +13,9 @@ #define DEBUG_TYPE "toolrunner" #include "llvm/Support/ToolRunner.h" -#include "Config/config.h" // for HAVE_LINK_R -#include "Support/Debug.h" -#include "Support/FileUtilities.h" +#include "llvm/Config/config.h" // for HAVE_LINK_R +#include "llvm/Support/Debug.h" +#include "llvm/Support/FileUtilities.h" #include #include using namespace llvm; diff --git a/lib/System/Unix/Path.cpp b/lib/System/Unix/Path.cpp index 9a860a0672f..49b2bf4afe1 100644 --- a/lib/System/Unix/Path.cpp +++ b/lib/System/Unix/Path.cpp @@ -16,10 +16,10 @@ //=== is guaranteed to work on *all* UNIX variants. //===----------------------------------------------------------------------===// +#include #include "Unix.h" #include #include -#include namespace llvm { using namespace sys; diff --git a/lib/System/Unix/Path.inc b/lib/System/Unix/Path.inc index 9a860a0672f..49b2bf4afe1 100644 --- a/lib/System/Unix/Path.inc +++ b/lib/System/Unix/Path.inc @@ -16,10 +16,10 @@ //=== is guaranteed to work on *all* UNIX variants. //===----------------------------------------------------------------------===// +#include #include "Unix.h" #include #include -#include namespace llvm { using namespace sys; diff --git a/lib/System/Unix/Program.cpp b/lib/System/Unix/Program.cpp index ca8514dfa69..b8ef55925d6 100644 --- a/lib/System/Unix/Program.cpp +++ b/lib/System/Unix/Program.cpp @@ -16,10 +16,10 @@ //=== is guaranteed to work on *all* UNIX variants. //===----------------------------------------------------------------------===// +#include #include "Unix.h" #include #include -#include #ifdef HAVE_SYS_WAIT_H #include #endif diff --git a/lib/System/Unix/Program.inc b/lib/System/Unix/Program.inc index ca8514dfa69..b8ef55925d6 100644 --- a/lib/System/Unix/Program.inc +++ b/lib/System/Unix/Program.inc @@ -16,10 +16,10 @@ //=== is guaranteed to work on *all* UNIX variants. //===----------------------------------------------------------------------===// +#include #include "Unix.h" #include #include -#include #ifdef HAVE_SYS_WAIT_H #include #endif diff --git a/lib/System/Unix/Unix.h b/lib/System/Unix/Unix.h index aa6bfb1a78a..b9eff46c46f 100644 --- a/lib/System/Unix/Unix.h +++ b/lib/System/Unix/Unix.h @@ -16,7 +16,7 @@ //=== is guaranteed to work on all UNIX variants. //===----------------------------------------------------------------------===// -#include "Config/config.h" // Get autoconf configuration settings +#include "llvm/Config/config.h" // Get autoconf configuration settings #include #include #include diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index b8208d4a4c7..45a771f9dfe 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -32,9 +32,9 @@ #include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/Support/InstVisitor.h" #include "llvm/Support/Mangler.h" -#include "Support/StringExtras.h" -#include "Support/MathExtras.h" -#include "Config/config.h" +#include "llvm/ADT/StringExtras.h" +#include "llvm/Support/MathExtras.h" +#include "llvm/Config/config.h" #include #include #include diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index b8208d4a4c7..45a771f9dfe 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -32,9 +32,9 @@ #include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/Support/InstVisitor.h" #include "llvm/Support/Mangler.h" -#include "Support/StringExtras.h" -#include "Support/MathExtras.h" -#include "Config/config.h" +#include "llvm/ADT/StringExtras.h" +#include "llvm/Support/MathExtras.h" +#include "llvm/Config/config.h" #include #include #include diff --git a/lib/Target/PowerPC/PPC32AsmPrinter.cpp b/lib/Target/PowerPC/PPC32AsmPrinter.cpp index 2358f1608a0..b30977b1a19 100644 --- a/lib/Target/PowerPC/PPC32AsmPrinter.cpp +++ b/lib/Target/PowerPC/PPC32AsmPrinter.cpp @@ -29,10 +29,10 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/ValueTypes.h" #include "llvm/Support/Mangler.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" -#include "Support/StringExtras.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/StringExtras.h" #include using namespace llvm; diff --git a/lib/Target/PowerPC/PPC32ISelSimple.cpp b/lib/Target/PowerPC/PPC32ISelSimple.cpp index 923e8d57bc0..5ba7a5beeb2 100644 --- a/lib/Target/PowerPC/PPC32ISelSimple.cpp +++ b/lib/Target/PowerPC/PPC32ISelSimple.cpp @@ -26,8 +26,8 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/Support/InstVisitor.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; diff --git a/lib/Target/PowerPC/PPC64AsmPrinter.cpp b/lib/Target/PowerPC/PPC64AsmPrinter.cpp index 74aaad5b154..972fa01bb91 100644 --- a/lib/Target/PowerPC/PPC64AsmPrinter.cpp +++ b/lib/Target/PowerPC/PPC64AsmPrinter.cpp @@ -25,11 +25,11 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Support/Mangler.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/MathExtras.h" -#include "Support/Statistic.h" -#include "Support/StringExtras.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/MathExtras.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/StringExtras.h" #include namespace llvm { diff --git a/lib/Target/PowerPC/PPC64ISelSimple.cpp b/lib/Target/PowerPC/PPC64ISelSimple.cpp index 637e8565b25..107266ed62e 100644 --- a/lib/Target/PowerPC/PPC64ISelSimple.cpp +++ b/lib/Target/PowerPC/PPC64ISelSimple.cpp @@ -26,8 +26,8 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/Support/InstVisitor.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; diff --git a/lib/Target/PowerPC/PPC64RegisterInfo.cpp b/lib/Target/PowerPC/PPC64RegisterInfo.cpp index 774e661e62f..1871c2e3152 100644 --- a/lib/Target/PowerPC/PPC64RegisterInfo.cpp +++ b/lib/Target/PowerPC/PPC64RegisterInfo.cpp @@ -24,9 +24,9 @@ #include "llvm/Target/TargetFrameInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/STLExtras.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/STLExtras.h" #include #include using namespace llvm; diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp index 2358f1608a0..b30977b1a19 100644 --- a/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -29,10 +29,10 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/ValueTypes.h" #include "llvm/Support/Mangler.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" -#include "Support/StringExtras.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/StringExtras.h" #include using namespace llvm; diff --git a/lib/Target/PowerPC/PPCBranchSelector.cpp b/lib/Target/PowerPC/PPCBranchSelector.cpp index e2456c9320d..6f7b597da3a 100644 --- a/lib/Target/PowerPC/PPCBranchSelector.cpp +++ b/lib/Target/PowerPC/PPCBranchSelector.cpp @@ -22,7 +22,7 @@ #include "PPC32InstrInfo.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineFunction.h" -#include "Support/Debug.h" +#include "llvm/Support/Debug.h" #include using namespace llvm; diff --git a/lib/Target/PowerPC/PPCCodeEmitter.cpp b/lib/Target/PowerPC/PPCCodeEmitter.cpp index b8eb6b67142..b08ce92d99f 100644 --- a/lib/Target/PowerPC/PPCCodeEmitter.cpp +++ b/lib/Target/PowerPC/PPCCodeEmitter.cpp @@ -15,7 +15,7 @@ #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/Passes.h" -#include "Support/Debug.h" +#include "llvm/Support/Debug.h" namespace llvm { diff --git a/lib/Target/PowerPC/PPCRegisterInfo.cpp b/lib/Target/PowerPC/PPCRegisterInfo.cpp index bebb8688418..321a44939b6 100644 --- a/lib/Target/PowerPC/PPCRegisterInfo.cpp +++ b/lib/Target/PowerPC/PPCRegisterInfo.cpp @@ -24,9 +24,9 @@ #include "llvm/Target/TargetFrameInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/STLExtras.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/STLExtras.h" #include #include using namespace llvm; diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index fa2455cc873..f9f1cb4a531 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -25,7 +25,7 @@ #include "llvm/Target/TargetOptions.h" #include "llvm/Target/TargetMachineRegistry.h" #include "llvm/Transforms/Scalar.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include using namespace llvm; diff --git a/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp b/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp index fc4d6a7164d..69ecb90f31d 100644 --- a/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp +++ b/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp @@ -20,7 +20,7 @@ #include "../../Target/SparcV9/MachineCodeForInstruction.h" #include "../../Target/SparcV9/LiveVar/FunctionLiveVarInfo.h" #include "../../Target/SparcV9/SparcV9InstrInfo.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include #include diff --git a/lib/Target/SparcV9/InstrSched/SchedGraph.cpp b/lib/Target/SparcV9/InstrSched/SchedGraph.cpp index e3b3cba5249..00b48d537d3 100644 --- a/lib/Target/SparcV9/InstrSched/SchedGraph.cpp +++ b/lib/Target/SparcV9/InstrSched/SchedGraph.cpp @@ -22,7 +22,7 @@ #include "../../Target/SparcV9/MachineCodeForInstruction.h" #include "../../Target/SparcV9/SparcV9RegInfo.h" #include "../../Target/SparcV9/SparcV9InstrInfo.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/STLExtras.h" #include namespace llvm { diff --git a/lib/Target/SparcV9/InstrSched/SchedGraph.h b/lib/Target/SparcV9/InstrSched/SchedGraph.h index e327598bd57..53ded6377d0 100644 --- a/lib/Target/SparcV9/InstrSched/SchedGraph.h +++ b/lib/Target/SparcV9/InstrSched/SchedGraph.h @@ -22,8 +22,8 @@ #include "llvm/CodeGen/SchedGraphCommon.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Transforms/Scalar.h" -#include "Support/hash_map" -#include "Support/GraphTraits.h" +#include "llvm/ADT/hash_map" +#include "llvm/ADT/GraphTraits.h" namespace llvm { diff --git a/lib/Target/SparcV9/InstrSched/SchedGraphCommon.cpp b/lib/Target/SparcV9/InstrSched/SchedGraphCommon.cpp index da4492f359d..0ad5f5844e7 100644 --- a/lib/Target/SparcV9/InstrSched/SchedGraphCommon.cpp +++ b/lib/Target/SparcV9/InstrSched/SchedGraphCommon.cpp @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// #include "llvm/CodeGen/SchedGraphCommon.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/STLExtras.h" #include namespace llvm { diff --git a/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp b/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp index 3c0e0b2c33c..0aaece228d8 100644 --- a/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp +++ b/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp @@ -21,7 +21,7 @@ #include "../../Target/SparcV9/LiveVar/FunctionLiveVarInfo.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/Support/CFG.h" -#include "Support/PostOrderIterator.h" +#include "llvm/ADT/PostOrderIterator.h" #include namespace llvm { diff --git a/lib/Target/SparcV9/InstrSched/SchedPriorities.h b/lib/Target/SparcV9/InstrSched/SchedPriorities.h index 74704678066..dd807f788e3 100644 --- a/lib/Target/SparcV9/InstrSched/SchedPriorities.h +++ b/lib/Target/SparcV9/InstrSched/SchedPriorities.h @@ -23,7 +23,7 @@ #include "SchedGraph.h" #include "llvm/CodeGen/InstrScheduling.h" #include "llvm/Target/TargetSchedInfo.h" -#include "Support/hash_set" +#include "llvm/ADT/hash_set" #include namespace llvm { diff --git a/lib/Target/SparcV9/LiveVar/BBLiveVar.cpp b/lib/Target/SparcV9/LiveVar/BBLiveVar.cpp index 09f59542696..785054c9f27 100644 --- a/lib/Target/SparcV9/LiveVar/BBLiveVar.cpp +++ b/lib/Target/SparcV9/LiveVar/BBLiveVar.cpp @@ -16,7 +16,7 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/Support/CFG.h" -#include "Support/SetOperations.h" +#include "llvm/ADT/SetOperations.h" #include "../SparcV9Internals.h" #include diff --git a/lib/Target/SparcV9/LiveVar/BBLiveVar.h b/lib/Target/SparcV9/LiveVar/BBLiveVar.h index 7e5c72e3e46..e8486acf078 100644 --- a/lib/Target/SparcV9/LiveVar/BBLiveVar.h +++ b/lib/Target/SparcV9/LiveVar/BBLiveVar.h @@ -16,7 +16,7 @@ #define LIVE_VAR_BB_H #include "llvm/CodeGen/ValueSet.h" -#include "Support/hash_map" +#include "llvm/ADT/hash_map" namespace llvm { diff --git a/lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.cpp b/lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.cpp index 4a8ada91238..2883bf1c092 100644 --- a/lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.cpp +++ b/lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.cpp @@ -18,9 +18,9 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Support/CFG.h" -#include "Support/PostOrderIterator.h" -#include "Support/SetOperations.h" -#include "Support/CommandLine.h" +#include "llvm/ADT/PostOrderIterator.h" +#include "llvm/ADT/SetOperations.h" +#include "llvm/Support/CommandLine.h" #include "BBLiveVar.h" #include diff --git a/lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.h b/lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.h index 23a9d93a6eb..02d5c0531bb 100644 --- a/lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.h +++ b/lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.h @@ -35,7 +35,7 @@ #ifndef FUNCTION_LIVE_VAR_INFO_H #define FUNCTION_LIVE_VAR_INFO_H -#include "Support/hash_map" +#include "llvm/ADT/hash_map" #include "llvm/Pass.h" #include "llvm/CodeGen/ValueSet.h" diff --git a/lib/Target/SparcV9/MachineFunctionInfo.h b/lib/Target/SparcV9/MachineFunctionInfo.h index 70bbccded58..3596bc2fa1b 100644 --- a/lib/Target/SparcV9/MachineFunctionInfo.h +++ b/lib/Target/SparcV9/MachineFunctionInfo.h @@ -20,8 +20,8 @@ #include "MachineCodeForInstruction.h" #include "llvm/CodeGen/MachineFunction.h" -#include "Support/HashExtras.h" -#include "Support/hash_set" +#include "llvm/ADT/HashExtras.h" +#include "llvm/ADT/hash_set" namespace llvm { diff --git a/lib/Target/SparcV9/MappingInfo.cpp b/lib/Target/SparcV9/MappingInfo.cpp index e8c7581ed7b..1a7212c9c09 100644 --- a/lib/Target/SparcV9/MappingInfo.cpp +++ b/lib/Target/SparcV9/MappingInfo.cpp @@ -47,7 +47,7 @@ #include "llvm/Module.h" #include "llvm/CodeGen/MachineFunction.h" #include "MachineCodeForInstruction.h" -#include "Support/StringExtras.h" +#include "llvm/ADT/StringExtras.h" namespace llvm { diff --git a/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp b/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp index c57cb5a3bdb..b8bbccf8be2 100644 --- a/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp +++ b/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp @@ -13,7 +13,7 @@ #define DEBUG_TYPE "ModuloSched" #include "MSSchedule.h" -#include "Support/Debug.h" +#include "llvm/Support/Debug.h" #include "llvm/Target/TargetSchedInfo.h" using namespace llvm; diff --git a/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp b/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp index 6bee44d934a..5bdcc9afcf2 100644 --- a/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp +++ b/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.cpp @@ -16,7 +16,7 @@ #include "../../Target/SparcV9/SparcV9RegisterInfo.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/Target/TargetInstrInfo.h" -#include "Support/Debug.h" +#include "llvm/Support/Debug.h" #include using namespace llvm; diff --git a/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h b/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h index 0dcbb496f19..4ea572a380b 100644 --- a/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h +++ b/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h @@ -16,9 +16,9 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Target/TargetMachine.h" -#include "Support/GraphTraits.h" -#include "Support/STLExtras.h" -#include "Support/iterator" +#include "llvm/ADT/GraphTraits.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/iterator" #include namespace llvm { diff --git a/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp b/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp index dadc38570c6..9ad1e4ce4bd 100644 --- a/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp +++ b/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp @@ -21,9 +21,9 @@ #include "llvm/CodeGen/Passes.h" #include "llvm/Support/CFG.h" #include "llvm/Target/TargetSchedInfo.h" -#include "Support/Debug.h" -#include "Support/GraphWriter.h" -#include "Support/StringExtras.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/GraphWriter.h" +#include "llvm/ADT/StringExtras.h" #include #include #include diff --git a/lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp b/lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp index 9344e63f693..3f57eccd89c 100644 --- a/lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp +++ b/lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp @@ -14,7 +14,7 @@ #include "IGNode.h" #include "InterferenceGraph.h" #include "RegAllocCommon.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/STLExtras.h" #include #include diff --git a/lib/Target/SparcV9/RegAlloc/LiveRange.h b/lib/Target/SparcV9/RegAlloc/LiveRange.h index 7a37596af00..503eddac7f6 100644 --- a/lib/Target/SparcV9/RegAlloc/LiveRange.h +++ b/lib/Target/SparcV9/RegAlloc/LiveRange.h @@ -16,7 +16,7 @@ #define LIVERANGE_H #include "llvm/Value.h" -#include "Support/SetVector.h" +#include "llvm/ADT/SetVector.h" #include namespace llvm { diff --git a/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp b/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp index b2b49d54652..190e0c57af6 100644 --- a/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp +++ b/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp @@ -21,7 +21,7 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetInstrInfo.h" #include "../SparcV9RegInfo.h" -#include "Support/SetOperations.h" +#include "llvm/ADT/SetOperations.h" #include namespace llvm { diff --git a/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h b/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h index 89a169ea933..a6569146057 100644 --- a/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h +++ b/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h @@ -27,7 +27,7 @@ #define LIVERANGEINFO_H #include "llvm/CodeGen/ValueSet.h" -#include "Support/hash_map" +#include "llvm/ADT/hash_map" namespace llvm { diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp index bbbaee8822c..6a1710ef544 100644 --- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp +++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp @@ -43,9 +43,9 @@ #include "llvm/CodeGen/Passes.h" #include "llvm/Support/InstIterator.h" #include "llvm/Target/TargetInstrInfo.h" -#include "Support/CommandLine.h" -#include "Support/SetOperations.h" -#include "Support/STLExtras.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/ADT/SetOperations.h" +#include "llvm/ADT/STLExtras.h" #include #include diff --git a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp index 36deae09d82..dbfc1e1e0ca 100644 --- a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp +++ b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp @@ -28,8 +28,8 @@ #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Support/Mangler.h" -#include "Support/StringExtras.h" -#include "Support/Statistic.h" +#include "llvm/ADT/StringExtras.h" +#include "llvm/ADT/Statistic.h" #include "SparcV9Internals.h" #include "MachineFunctionInfo.h" #include diff --git a/lib/Target/SparcV9/SparcV9BurgISel.cpp b/lib/Target/SparcV9/SparcV9BurgISel.cpp index 0b4685c3a47..1d4dbbd2bf7 100644 --- a/lib/Target/SparcV9/SparcV9BurgISel.cpp +++ b/lib/Target/SparcV9/SparcV9BurgISel.cpp @@ -37,12 +37,12 @@ #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Type.h" -#include "Config/alloca.h" -#include "Support/CommandLine.h" -#include "Support/LeakDetector.h" -#include "Support/MathExtras.h" -#include "Support/STLExtras.h" -#include "Support/hash_map" +#include "llvm/Config/alloca.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/LeakDetector.h" +#include "llvm/Support/MathExtras.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/hash_map" #include #include #include diff --git a/lib/Target/SparcV9/SparcV9CodeEmitter.cpp b/lib/Target/SparcV9/SparcV9CodeEmitter.cpp index e870a15e86a..b46d07eb7b0 100644 --- a/lib/Target/SparcV9/SparcV9CodeEmitter.cpp +++ b/lib/Target/SparcV9/SparcV9CodeEmitter.cpp @@ -30,15 +30,15 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetData.h" -#include "Support/Debug.h" -#include "Support/hash_set" -#include "Support/Statistic.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/hash_set" +#include "llvm/ADT/Statistic.h" #include "SparcV9Internals.h" #include "SparcV9TargetMachine.h" #include "SparcV9RegInfo.h" #include "SparcV9CodeEmitter.h" #include "MachineFunctionInfo.h" -#include "Config/alloca.h" +#include "llvm/Config/alloca.h" namespace llvm { diff --git a/lib/Target/SparcV9/SparcV9Internals.h b/lib/Target/SparcV9/SparcV9Internals.h index 3ac696401fc..187d984a47e 100644 --- a/lib/Target/SparcV9/SparcV9Internals.h +++ b/lib/Target/SparcV9/SparcV9Internals.h @@ -22,7 +22,7 @@ #include "SparcV9RegInfo.h" #include "llvm/Type.h" #include "SparcV9RegClassInfo.h" -#include "Config/sys/types.h" +#include "llvm/Config/sys/types.h" namespace llvm { diff --git a/lib/Target/SparcV9/SparcV9PeepholeOpts.cpp b/lib/Target/SparcV9/SparcV9PeepholeOpts.cpp index 0b7baabb8d3..778ced25321 100644 --- a/lib/Target/SparcV9/SparcV9PeepholeOpts.cpp +++ b/lib/Target/SparcV9/SparcV9PeepholeOpts.cpp @@ -19,7 +19,7 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/STLExtras.h" namespace llvm { diff --git a/lib/Target/SparcV9/SparcV9RegInfo.h b/lib/Target/SparcV9/SparcV9RegInfo.h index 6f0ef04ae34..25a09616d0c 100644 --- a/lib/Target/SparcV9/SparcV9RegInfo.h +++ b/lib/Target/SparcV9/SparcV9RegInfo.h @@ -15,7 +15,7 @@ #ifndef SPARCV9REGINFO_H #define SPARCV9REGINFO_H -#include "Support/hash_map" +#include "llvm/ADT/hash_map" #include #include diff --git a/lib/Target/SparcV9/SparcV9TargetMachine.cpp b/lib/Target/SparcV9/SparcV9TargetMachine.cpp index 29a208c68c1..1019c5619f5 100644 --- a/lib/Target/SparcV9/SparcV9TargetMachine.cpp +++ b/lib/Target/SparcV9/SparcV9TargetMachine.cpp @@ -29,7 +29,7 @@ #include "SparcV9Internals.h" #include "SparcV9TargetMachine.h" #include "SparcV9BurgISel.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" using namespace llvm; static const unsigned ImplicitRegUseList[] = { 0 }; /* not used yet */ diff --git a/lib/Target/SparcV9/SparcV9TmpInstr.cpp b/lib/Target/SparcV9/SparcV9TmpInstr.cpp index 605cf061898..6e53cbc3c30 100644 --- a/lib/Target/SparcV9/SparcV9TmpInstr.cpp +++ b/lib/Target/SparcV9/SparcV9TmpInstr.cpp @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// #include "SparcV9TmpInstr.h" -#include "Support/LeakDetector.h" +#include "llvm/Support/LeakDetector.h" namespace llvm { diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index 22dde60d8f6..a57d6ba2fba 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -21,7 +21,7 @@ #include "llvm/DerivedTypes.h" #include "llvm/Constants.h" #include "llvm/Support/GetElementPtrTypeIterator.h" -#include "Support/MathExtras.h" +#include "llvm/Support/MathExtras.h" using namespace llvm; // Handle the Pass registration stuff necessary to use TargetData's. diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp index ee8ef2e5ed6..973165f186e 100644 --- a/lib/Target/TargetMachine.cpp +++ b/lib/Target/TargetMachine.cpp @@ -14,7 +14,7 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Type.h" #include "llvm/CodeGen/IntrinsicLowering.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" using namespace llvm; //--------------------------------------------------------------------------- diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp index a0f046b62f8..915ac3afd24 100644 --- a/lib/Target/X86/X86AsmPrinter.cpp +++ b/lib/Target/X86/X86AsmPrinter.cpp @@ -29,9 +29,9 @@ #include "llvm/CodeGen/ValueTypes.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Support/Mangler.h" -#include "Support/Statistic.h" -#include "Support/StringExtras.h" -#include "Support/CommandLine.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/StringExtras.h" +#include "llvm/Support/CommandLine.h" using namespace llvm; namespace { diff --git a/lib/Target/X86/X86CodeEmitter.cpp b/lib/Target/X86/X86CodeEmitter.cpp index 98e3bb4912a..69ab9ca928e 100644 --- a/lib/Target/X86/X86CodeEmitter.cpp +++ b/lib/Target/X86/X86CodeEmitter.cpp @@ -21,9 +21,9 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/Passes.h" #include "llvm/Function.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" -#include "Config/alloca.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/Config/alloca.h" using namespace llvm; namespace { diff --git a/lib/Target/X86/X86FloatingPoint.cpp b/lib/Target/X86/X86FloatingPoint.cpp index 8d7a8e72cc1..30763f0b986 100644 --- a/lib/Target/X86/X86FloatingPoint.cpp +++ b/lib/Target/X86/X86FloatingPoint.cpp @@ -37,10 +37,10 @@ #include "llvm/CodeGen/Passes.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" -#include "Support/Debug.h" -#include "Support/DepthFirstIterator.h" -#include "Support/Statistic.h" -#include "Support/STLExtras.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" #include #include using namespace llvm; diff --git a/lib/Target/X86/X86ISelSimple.cpp b/lib/Target/X86/X86ISelSimple.cpp index 19c61080db6..e9dbc4b314a 100644 --- a/lib/Target/X86/X86ISelSimple.cpp +++ b/lib/Target/X86/X86ISelSimple.cpp @@ -28,7 +28,7 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/Support/InstVisitor.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Target/X86/X86PeepholeOpt.cpp b/lib/Target/X86/X86PeepholeOpt.cpp index 82c622bff13..f03e339d2a6 100644 --- a/lib/Target/X86/X86PeepholeOpt.cpp +++ b/lib/Target/X86/X86PeepholeOpt.cpp @@ -17,8 +17,8 @@ #include "llvm/Target/MRegisterInfo.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" -#include "Support/Statistic.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" using namespace llvm; diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index bac6138f03a..d78110eb8f2 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -24,8 +24,8 @@ #include "llvm/Target/TargetFrameInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" -#include "Support/CommandLine.h" -#include "Support/STLExtras.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/ADT/STLExtras.h" #include using namespace llvm; diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index 1a9e978dc4a..06cbc49abf3 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -21,8 +21,8 @@ #include "llvm/Target/TargetOptions.h" #include "llvm/Target/TargetMachineRegistry.h" #include "llvm/Transforms/Scalar.h" -#include "Support/CommandLine.h" -#include "Support/Statistic.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; X86VectorEnum llvm::X86Vector = NoSSE; diff --git a/lib/Transforms/ExprTypeConvert.cpp b/lib/Transforms/ExprTypeConvert.cpp index a657f023df4..779e23c1992 100644 --- a/lib/Transforms/ExprTypeConvert.cpp +++ b/lib/Transforms/ExprTypeConvert.cpp @@ -17,8 +17,8 @@ #include "llvm/Constants.h" #include "llvm/Instructions.h" #include "llvm/Analysis/Expressions.h" -#include "Support/STLExtras.h" -#include "Support/Debug.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/Support/Debug.h" #include using namespace llvm; diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index fe945c408d6..a4086524e17 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -39,10 +39,10 @@ #include "llvm/Target/TargetData.h" #include "llvm/Support/CallSite.h" #include "llvm/Support/CFG.h" -#include "Support/Debug.h" -#include "Support/DepthFirstIterator.h" -#include "Support/Statistic.h" -#include "Support/StringExtras.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/StringExtras.h" #include using namespace llvm; diff --git a/lib/Transforms/IPO/ConstantMerge.cpp b/lib/Transforms/IPO/ConstantMerge.cpp index 417cb1de4bb..9f3c10959cc 100644 --- a/lib/Transforms/IPO/ConstantMerge.cpp +++ b/lib/Transforms/IPO/ConstantMerge.cpp @@ -20,7 +20,7 @@ #include "llvm/Transforms/IPO.h" #include "llvm/Module.h" #include "llvm/Pass.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp index 836e0b60912..cde186c38d8 100644 --- a/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -24,9 +24,9 @@ #include "llvm/Constant.h" #include "llvm/Instructions.h" #include "llvm/Support/CallSite.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" -#include "Support/iterator" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/iterator" #include using namespace llvm; diff --git a/lib/Transforms/IPO/DeadTypeElimination.cpp b/lib/Transforms/IPO/DeadTypeElimination.cpp index cad90f56729..e2d475daf9f 100644 --- a/lib/Transforms/IPO/DeadTypeElimination.cpp +++ b/lib/Transforms/IPO/DeadTypeElimination.cpp @@ -17,7 +17,7 @@ #include "llvm/Module.h" #include "llvm/SymbolTable.h" #include "llvm/DerivedTypes.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Transforms/IPO/FunctionResolution.cpp b/lib/Transforms/IPO/FunctionResolution.cpp index 8403226ba38..006d33cf519 100644 --- a/lib/Transforms/IPO/FunctionResolution.cpp +++ b/lib/Transforms/IPO/FunctionResolution.cpp @@ -27,7 +27,7 @@ #include "llvm/Support/CallSite.h" #include "llvm/Target/TargetData.h" #include "llvm/Assembly/Writer.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; diff --git a/lib/Transforms/IPO/GlobalDCE.cpp b/lib/Transforms/IPO/GlobalDCE.cpp index e025813fd07..ea5201cd232 100644 --- a/lib/Transforms/IPO/GlobalDCE.cpp +++ b/lib/Transforms/IPO/GlobalDCE.cpp @@ -19,7 +19,7 @@ #include "llvm/Constants.h" #include "llvm/Module.h" #include "llvm/Pass.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index f9be0ad2460..dd9894cd19f 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -23,8 +23,8 @@ #include "llvm/Instructions.h" #include "llvm/Module.h" #include "llvm/Pass.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp index 36ac2023c1d..74a0a9b699e 100644 --- a/lib/Transforms/IPO/IPConstantPropagation.cpp +++ b/lib/Transforms/IPO/IPConstantPropagation.cpp @@ -20,7 +20,7 @@ #include "llvm/Pass.h" #include "llvm/Constants.h" #include "llvm/Support/CallSite.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp index f0cb03d7b17..86d343af6a0 100644 --- a/lib/Transforms/IPO/Inliner.cpp +++ b/lib/Transforms/IPO/Inliner.cpp @@ -19,9 +19,9 @@ #include "llvm/Analysis/CallGraph.h" #include "llvm/Support/CallSite.h" #include "llvm/Transforms/Utils/Cloning.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; diff --git a/lib/Transforms/IPO/Internalize.cpp b/lib/Transforms/IPO/Internalize.cpp index 15c68cd893b..c6b75b1be92 100644 --- a/lib/Transforms/IPO/Internalize.cpp +++ b/lib/Transforms/IPO/Internalize.cpp @@ -16,9 +16,9 @@ #include "llvm/Transforms/IPO.h" #include "llvm/Pass.h" #include "llvm/Module.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" #include #include using namespace llvm; diff --git a/lib/Transforms/IPO/LoopExtractor.cpp b/lib/Transforms/IPO/LoopExtractor.cpp index a36c99632e6..e1ce290526c 100644 --- a/lib/Transforms/IPO/LoopExtractor.cpp +++ b/lib/Transforms/IPO/LoopExtractor.cpp @@ -22,7 +22,7 @@ #include "llvm/Analysis/LoopInfo.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Utils/FunctionUtils.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp index f5c36d99ae4..ebd0500cba5 100644 --- a/lib/Transforms/IPO/LowerSetJmp.cpp +++ b/lib/Transforms/IPO/LowerSetJmp.cpp @@ -43,10 +43,10 @@ #include "llvm/Support/CFG.h" #include "llvm/Support/InstVisitor.h" #include "llvm/Transforms/Utils/Local.h" -#include "Support/DepthFirstIterator.h" -#include "Support/Statistic.h" -#include "Support/StringExtras.h" -#include "Support/VectorExtras.h" +#include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/StringExtras.h" +#include "llvm/ADT/VectorExtras.h" using namespace llvm; namespace { diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index fbb16594882..43b9acff731 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -20,7 +20,7 @@ #include "llvm/Intrinsics.h" #include "llvm/Instructions.h" #include "llvm/Analysis/CallGraph.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; diff --git a/lib/Transforms/IPO/RaiseAllocations.cpp b/lib/Transforms/IPO/RaiseAllocations.cpp index 36aef9c8eb6..42edb7e05de 100644 --- a/lib/Transforms/IPO/RaiseAllocations.cpp +++ b/lib/Transforms/IPO/RaiseAllocations.cpp @@ -19,7 +19,7 @@ #include "llvm/Instructions.h" #include "llvm/Pass.h" #include "llvm/Support/CallSite.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp b/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp index c60636cfb57..28830afba82 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp @@ -14,7 +14,7 @@ #include "Graph.h" #include "llvm/Instructions.h" -#include "Support/Debug.h" +#include "llvm/Support/Debug.h" #include using std::vector; diff --git a/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp b/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp index 4e8419d9656..10ef440b4f8 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp @@ -15,7 +15,7 @@ #include "llvm/Pass.h" #include "llvm/Module.h" #include "llvm/Instructions.h" -#include "Support/Debug.h" +#include "llvm/Support/Debug.h" #include #include "Graph.h" diff --git a/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp b/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp index 96d23f2253e..56a20730b78 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp @@ -20,7 +20,7 @@ #include "llvm/Module.h" #include "llvm/Pass.h" #include "llvm/Type.h" -#include "Support/Debug.h" +#include "llvm/Support/Debug.h" #include "../ProfilingUtils.h" namespace llvm { diff --git a/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp b/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp index 3953c28e52b..60426c4e5af 100644 --- a/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp +++ b/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp @@ -20,7 +20,7 @@ #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Instructions.h" #include "ProfilingUtils.h" -#include "Support/Debug.h" +#include "llvm/Support/Debug.h" #include using namespace llvm; diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp index ae356a2f73d..1247dfcfbb5 100644 --- a/lib/Transforms/Instrumentation/TraceValues.cpp +++ b/lib/Transforms/Instrumentation/TraceValues.cpp @@ -19,8 +19,8 @@ #include "llvm/Module.h" #include "llvm/Pass.h" #include "llvm/Assembly/Writer.h" -#include "Support/CommandLine.h" -#include "Support/StringExtras.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/ADT/StringExtras.h" #include #include using namespace llvm; diff --git a/lib/Transforms/LevelRaise.cpp b/lib/Transforms/LevelRaise.cpp index f470e504610..cc4e69d9acd 100644 --- a/lib/Transforms/LevelRaise.cpp +++ b/lib/Transforms/LevelRaise.cpp @@ -19,10 +19,10 @@ #include "llvm/Instructions.h" #include "llvm/Pass.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" -#include "Support/STLExtras.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" #include using namespace llvm; diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index 04a64172726..5770bb692c2 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/lib/Transforms/Scalar/ADCE.cpp @@ -23,10 +23,10 @@ #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Transforms/Utils/Local.h" #include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h" -#include "Support/Debug.h" -#include "Support/DepthFirstIterator.h" -#include "Support/Statistic.h" -#include "Support/STLExtras.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" #include using namespace llvm; diff --git a/lib/Transforms/Scalar/BasicBlockPlacement.cpp b/lib/Transforms/Scalar/BasicBlockPlacement.cpp index a25ab0f1215..cadc6201708 100644 --- a/lib/Transforms/Scalar/BasicBlockPlacement.cpp +++ b/lib/Transforms/Scalar/BasicBlockPlacement.cpp @@ -30,7 +30,7 @@ #include "llvm/Function.h" #include "llvm/Pass.h" #include "llvm/Support/CFG.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; diff --git a/lib/Transforms/Scalar/ConstantProp.cpp b/lib/Transforms/Scalar/ConstantProp.cpp index 8be02476b9c..2985ceba638 100644 --- a/lib/Transforms/Scalar/ConstantProp.cpp +++ b/lib/Transforms/Scalar/ConstantProp.cpp @@ -24,7 +24,7 @@ #include "llvm/Instruction.h" #include "llvm/Pass.h" #include "llvm/Support/InstIterator.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; diff --git a/lib/Transforms/Scalar/CorrelatedExprs.cpp b/lib/Transforms/Scalar/CorrelatedExprs.cpp index 9738879e282..53c56d2631a 100644 --- a/lib/Transforms/Scalar/CorrelatedExprs.cpp +++ b/lib/Transforms/Scalar/CorrelatedExprs.cpp @@ -38,9 +38,9 @@ #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Support/ConstantRange.h" #include "llvm/Support/CFG.h" -#include "Support/Debug.h" -#include "Support/PostOrderIterator.h" -#include "Support/Statistic.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/PostOrderIterator.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp index 570a5252d5a..1a523cde461 100644 --- a/lib/Transforms/Scalar/DCE.cpp +++ b/lib/Transforms/Scalar/DCE.cpp @@ -21,7 +21,7 @@ #include "llvm/Instruction.h" #include "llvm/Pass.h" #include "llvm/Support/InstIterator.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; diff --git a/lib/Transforms/Scalar/DeadStoreElimination.cpp b/lib/Transforms/Scalar/DeadStoreElimination.cpp index 40b5671e4c6..82dfebb5943 100644 --- a/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -22,8 +22,8 @@ #include "llvm/Analysis/AliasSetTracker.h" #include "llvm/Target/TargetData.h" #include "llvm/Transforms/Utils/Local.h" -#include "Support/SetVector.h" -#include "Support/Statistic.h" +#include "llvm/ADT/SetVector.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp b/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp index b1f8f2a01ab..40e1be5d461 100644 --- a/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp +++ b/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp @@ -22,8 +22,8 @@ #include "llvm/Instructions.h" #include "llvm/BasicBlock.h" #include "llvm/Pass.h" -#include "Support/Statistic.h" -#include "Support/Debug.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/Support/Debug.h" using namespace llvm; namespace { diff --git a/lib/Transforms/Scalar/GCSE.cpp b/lib/Transforms/Scalar/GCSE.cpp index a3452a3f847..776ff6603aa 100644 --- a/lib/Transforms/Scalar/GCSE.cpp +++ b/lib/Transforms/Scalar/GCSE.cpp @@ -22,8 +22,8 @@ #include "llvm/Analysis/Dominators.h" #include "llvm/Analysis/ValueNumbering.h" #include "llvm/Transforms/Utils/Local.h" -#include "Support/DepthFirstIterator.h" -#include "Support/Statistic.h" +#include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 7c1f1161f59..a2693534879 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -46,8 +46,8 @@ #include "llvm/Analysis/LoopInfo.h" #include "llvm/Support/CFG.h" #include "llvm/Transforms/Utils/Local.h" -#include "Support/CommandLine.h" -#include "Support/Statistic.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 97cdc1196ea..2340c49b563 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -49,8 +49,8 @@ #include "llvm/Support/InstIterator.h" #include "llvm/Support/InstVisitor.h" #include "llvm/Support/PatternMatch.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; using namespace llvm::PatternMatch; diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index 792a672f04b..9a104db00ad 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/lib/Transforms/Scalar/LICM.cpp @@ -42,9 +42,9 @@ #include "llvm/Support/CFG.h" #include "llvm/Transforms/Utils/PromoteMemToReg.h" #include "llvm/Transforms/Utils/Local.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; diff --git a/lib/Transforms/Scalar/LoopUnroll.cpp b/lib/Transforms/Scalar/LoopUnroll.cpp index a9cced5ce14..d24b94fac85 100644 --- a/lib/Transforms/Scalar/LoopUnroll.cpp +++ b/lib/Transforms/Scalar/LoopUnroll.cpp @@ -24,10 +24,10 @@ #include "llvm/Analysis/LoopInfo.h" #include "llvm/Transforms/Utils/Cloning.h" #include "llvm/Transforms/Utils/Local.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" -#include "Support/STLExtras.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" #include #include using namespace llvm; diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index 83dc1836d6b..73a99c22121 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -35,8 +35,8 @@ #include "llvm/Analysis/LoopInfo.h" #include "llvm/Transforms/Utils/Cloning.h" #include "llvm/Transforms/Utils/Local.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Transforms/Scalar/LowerPacked.cpp b/lib/Transforms/Scalar/LowerPacked.cpp index 2d90ccb3008..7a42bf7fbae 100644 --- a/lib/Transforms/Scalar/LowerPacked.cpp +++ b/lib/Transforms/Scalar/LowerPacked.cpp @@ -19,7 +19,7 @@ #include "llvm/Instructions.h" #include "llvm/Pass.h" #include "llvm/Support/InstVisitor.h" -#include "Support/StringExtras.h" +#include "llvm/ADT/StringExtras.h" #include #include #include diff --git a/lib/Transforms/Scalar/PRE.cpp b/lib/Transforms/Scalar/PRE.cpp index 38c5595ebc6..f8752336b2e 100644 --- a/lib/Transforms/Scalar/PRE.cpp +++ b/lib/Transforms/Scalar/PRE.cpp @@ -29,11 +29,11 @@ #include "llvm/Analysis/PostDominators.h" #include "llvm/Analysis/ValueNumbering.h" #include "llvm/Transforms/Scalar.h" -#include "Support/Debug.h" -#include "Support/DepthFirstIterator.h" -#include "Support/PostOrderIterator.h" -#include "Support/Statistic.h" -#include "Support/hash_set" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/PostOrderIterator.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/hash_set" using namespace llvm; namespace { diff --git a/lib/Transforms/Scalar/PiNodeInsertion.cpp b/lib/Transforms/Scalar/PiNodeInsertion.cpp index 5227e7c6125..202ca74040a 100644 --- a/lib/Transforms/Scalar/PiNodeInsertion.cpp +++ b/lib/Transforms/Scalar/PiNodeInsertion.cpp @@ -38,7 +38,7 @@ #include "llvm/Function.h" #include "llvm/Instructions.h" #include "llvm/Support/CFG.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp index 6f843448892..c74cf51ccc4 100644 --- a/lib/Transforms/Scalar/Reassociate.cpp +++ b/lib/Transforms/Scalar/Reassociate.cpp @@ -30,9 +30,9 @@ #include "llvm/Pass.h" #include "llvm/Constant.h" #include "llvm/Support/CFG.h" -#include "Support/Debug.h" -#include "Support/PostOrderIterator.h" -#include "Support/Statistic.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/PostOrderIterator.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 1c39160d9bd..497bf0ae9bb 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -30,10 +30,10 @@ #include "llvm/Type.h" #include "llvm/Support/InstVisitor.h" #include "llvm/Transforms/Utils/Local.h" -#include "Support/Debug.h" -#include "Support/hash_map" -#include "Support/Statistic.h" -#include "Support/STLExtras.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/hash_map" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/STLExtras.h" #include #include using namespace llvm; diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp index 32c9040c5b7..a0d5afe0ce5 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -29,9 +29,9 @@ #include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/Target/TargetData.h" #include "llvm/Transforms/Utils/PromoteMemToReg.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" -#include "Support/StringExtras.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/StringExtras.h" using namespace llvm; namespace { diff --git a/lib/Transforms/Scalar/SimplifyCFG.cpp b/lib/Transforms/Scalar/SimplifyCFG.cpp index 8e0f7d33073..0f9946e6ee6 100644 --- a/lib/Transforms/Scalar/SimplifyCFG.cpp +++ b/lib/Transforms/Scalar/SimplifyCFG.cpp @@ -23,7 +23,7 @@ #include "llvm/Module.h" #include "llvm/Support/CFG.h" #include "llvm/Pass.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" #include using namespace llvm; diff --git a/lib/Transforms/Scalar/TailDuplication.cpp b/lib/Transforms/Scalar/TailDuplication.cpp index 2a5a6062821..717a845765a 100644 --- a/lib/Transforms/Scalar/TailDuplication.cpp +++ b/lib/Transforms/Scalar/TailDuplication.cpp @@ -26,9 +26,9 @@ #include "llvm/Type.h" #include "llvm/Support/CFG.h" #include "llvm/Transforms/Utils/Local.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Transforms/Scalar/TailRecursionElimination.cpp b/lib/Transforms/Scalar/TailRecursionElimination.cpp index 0ca5562bae9..758628ca64c 100644 --- a/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/lib/Transforms/Scalar/TailRecursionElimination.cpp @@ -51,7 +51,7 @@ #include "llvm/Instructions.h" #include "llvm/Pass.h" #include "llvm/Support/CFG.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Transforms/Utils/BreakCriticalEdges.cpp b/lib/Transforms/Utils/BreakCriticalEdges.cpp index f5df6613345..4a5c9d904bf 100644 --- a/lib/Transforms/Utils/BreakCriticalEdges.cpp +++ b/lib/Transforms/Utils/BreakCriticalEdges.cpp @@ -22,7 +22,7 @@ #include "llvm/Function.h" #include "llvm/Instructions.h" #include "llvm/Support/CFG.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Transforms/Utils/CodeExtractor.cpp b/lib/Transforms/Utils/CodeExtractor.cpp index aabc587b56d..5dd03bd9e75 100644 --- a/lib/Transforms/Utils/CodeExtractor.cpp +++ b/lib/Transforms/Utils/CodeExtractor.cpp @@ -24,9 +24,9 @@ #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/StringExtras.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/StringExtras.h" #include #include using namespace llvm; diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index 41454ae0cb1..fe27f308cf0 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/lib/Transforms/Utils/Local.cpp @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#include "Support/MathExtras.h" +#include "llvm/Support/MathExtras.h" #include "llvm/Transforms/Utils/Local.h" #include "llvm/Constants.h" #include "llvm/Instructions.h" diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp index 2a4d88b99eb..81cf8e27780 100644 --- a/lib/Transforms/Utils/LoopSimplify.cpp +++ b/lib/Transforms/Utils/LoopSimplify.cpp @@ -41,10 +41,10 @@ #include "llvm/Analysis/LoopInfo.h" #include "llvm/Support/CFG.h" #include "llvm/Transforms/Utils/Local.h" -#include "Support/SetOperations.h" -#include "Support/SetVector.h" -#include "Support/Statistic.h" -#include "Support/DepthFirstIterator.h" +#include "llvm/ADT/SetOperations.h" +#include "llvm/ADT/SetVector.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/DepthFirstIterator.h" using namespace llvm; namespace { diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp index a5197a0e01c..f3c1a79052c 100644 --- a/lib/Transforms/Utils/LowerAllocations.cpp +++ b/lib/Transforms/Utils/LowerAllocations.cpp @@ -18,7 +18,7 @@ #include "llvm/Instructions.h" #include "llvm/Constants.h" #include "llvm/Pass.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp index 835a5ae7892..2c6cf7e91ad 100644 --- a/lib/Transforms/Utils/LowerInvoke.cpp +++ b/lib/Transforms/Utils/LowerInvoke.cpp @@ -41,8 +41,8 @@ #include "llvm/Module.h" #include "llvm/Pass.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" -#include "Support/Statistic.h" -#include "Support/CommandLine.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/Support/CommandLine.h" #include using namespace llvm; diff --git a/lib/Transforms/Utils/LowerSelect.cpp b/lib/Transforms/Utils/LowerSelect.cpp index 647658e3a54..f914e747a15 100644 --- a/lib/Transforms/Utils/LowerSelect.cpp +++ b/lib/Transforms/Utils/LowerSelect.cpp @@ -23,7 +23,7 @@ #include "llvm/Instructions.h" #include "llvm/Pass.h" #include "llvm/Type.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp index 710188aa2b6..24a2963c27e 100644 --- a/lib/Transforms/Utils/LowerSwitch.cpp +++ b/lib/Transforms/Utils/LowerSwitch.cpp @@ -18,8 +18,8 @@ #include "llvm/Function.h" #include "llvm/Instructions.h" #include "llvm/Pass.h" -#include "Support/Debug.h" -#include "Support/Statistic.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Transforms/Utils/Mem2Reg.cpp b/lib/Transforms/Utils/Mem2Reg.cpp index 12dd5825253..39400e72adc 100644 --- a/lib/Transforms/Utils/Mem2Reg.cpp +++ b/lib/Transforms/Utils/Mem2Reg.cpp @@ -18,7 +18,7 @@ #include "llvm/Instructions.h" #include "llvm/Function.h" #include "llvm/Target/TargetData.h" -#include "Support/Statistic.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { diff --git a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp index ced2315e0e7..81f5cd3ed3a 100644 --- a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp +++ b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp @@ -23,7 +23,7 @@ #include "llvm/Constant.h" #include "llvm/Support/CFG.h" #include "llvm/Support/StableBasicBlockNumbering.h" -#include "Support/StringExtras.h" +#include "llvm/ADT/StringExtras.h" using namespace llvm; /// isAllocaPromotable - Return true if this alloca is legal for promotion. diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index e2a5c8e3657..c9321733304 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -17,7 +17,7 @@ #include "llvm/Instructions.h" #include "llvm/Type.h" #include "llvm/Support/CFG.h" -#include "Support/Debug.h" +#include "llvm/Support/Debug.h" #include #include #include diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index f70a82839aa..0c4a1f78267 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -26,8 +26,8 @@ #include "llvm/SymbolTable.h" #include "llvm/Assembly/Writer.h" #include "llvm/Support/CFG.h" -#include "Support/StringExtras.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/StringExtras.h" +#include "llvm/ADT/STLExtras.h" #include using namespace llvm; diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp index 005740904d7..32c86c4ce69 100644 --- a/lib/VMCore/BasicBlock.cpp +++ b/lib/VMCore/BasicBlock.cpp @@ -17,7 +17,7 @@ #include "llvm/Type.h" #include "llvm/Support/CFG.h" #include "llvm/SymbolTable.h" -#include "Support/LeakDetector.h" +#include "llvm/Support/LeakDetector.h" #include "SymbolTableListTraitsImpl.h" #include using namespace llvm; diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 8b28c0d3ff6..77c34296aa8 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -18,7 +18,7 @@ #include "llvm/Instructions.h" #include "llvm/SymbolTable.h" #include "llvm/Module.h" -#include "Support/StringExtras.h" +#include "llvm/ADT/StringExtras.h" #include #include using namespace llvm; diff --git a/lib/VMCore/Dominators.cpp b/lib/VMCore/Dominators.cpp index b9eee7f4598..14ec3ccd9f3 100644 --- a/lib/VMCore/Dominators.cpp +++ b/lib/VMCore/Dominators.cpp @@ -17,8 +17,8 @@ #include "llvm/Analysis/Dominators.h" #include "llvm/Support/CFG.h" #include "llvm/Assembly/Writer.h" -#include "Support/DepthFirstIterator.h" -#include "Support/SetOperations.h" +#include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/SetOperations.h" #include using namespace llvm; diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp index bf9c8b48bde..e918fd5878a 100644 --- a/lib/VMCore/Function.cpp +++ b/lib/VMCore/Function.cpp @@ -17,7 +17,7 @@ #include "llvm/DerivedTypes.h" #include "llvm/Instructions.h" #include "llvm/Intrinsics.h" -#include "Support/LeakDetector.h" +#include "llvm/Support/LeakDetector.h" #include "SymbolTableListTraitsImpl.h" using namespace llvm; diff --git a/lib/VMCore/Globals.cpp b/lib/VMCore/Globals.cpp index cfecbc91ce0..b84dbf7fd4a 100644 --- a/lib/VMCore/Globals.cpp +++ b/lib/VMCore/Globals.cpp @@ -16,7 +16,7 @@ #include "llvm/GlobalVariable.h" #include "llvm/Module.h" #include "llvm/SymbolTable.h" -#include "Support/LeakDetector.h" +#include "llvm/Support/LeakDetector.h" using namespace llvm; //===----------------------------------------------------------------------===// diff --git a/lib/VMCore/Instruction.cpp b/lib/VMCore/Instruction.cpp index 1350f05b9b1..f54acf5f03e 100644 --- a/lib/VMCore/Instruction.cpp +++ b/lib/VMCore/Instruction.cpp @@ -14,7 +14,7 @@ #include "llvm/Function.h" #include "llvm/SymbolTable.h" #include "llvm/Type.h" -#include "Support/LeakDetector.h" +#include "llvm/Support/LeakDetector.h" using namespace llvm; void Instruction::init() diff --git a/lib/VMCore/LeakDetector.cpp b/lib/VMCore/LeakDetector.cpp index dbdb7dd70f2..807bd22b075 100644 --- a/lib/VMCore/LeakDetector.cpp +++ b/lib/VMCore/LeakDetector.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "Support/LeakDetector.h" +#include "llvm/Support/LeakDetector.h" #include "llvm/Value.h" #include #include diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp index ed58da05c94..69bbe261fa5 100644 --- a/lib/VMCore/Mangler.cpp +++ b/lib/VMCore/Mangler.cpp @@ -14,7 +14,7 @@ #include "llvm/Support/Mangler.h" #include "llvm/Module.h" #include "llvm/Type.h" -#include "Support/StringExtras.h" +#include "llvm/ADT/StringExtras.h" using namespace llvm; static char HexDigit(int V) { diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp index 125fd123f8c..d8caf7f1175 100644 --- a/lib/VMCore/Module.cpp +++ b/lib/VMCore/Module.cpp @@ -15,8 +15,8 @@ #include "llvm/InstrTypes.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" -#include "Support/STLExtras.h" -#include "Support/LeakDetector.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/Support/LeakDetector.h" #include "SymbolTableListTraitsImpl.h" #include #include diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp index d6fe2fba41c..5079b4ea65e 100644 --- a/lib/VMCore/Pass.cpp +++ b/lib/VMCore/Pass.cpp @@ -17,8 +17,8 @@ #include "PassManagerT.h" // PassManagerT implementation #include "llvm/Module.h" #include "llvm/ModuleProvider.h" -#include "Support/STLExtras.h" -#include "Support/TypeInfo.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/Support/TypeInfo.h" #include #include using namespace llvm; diff --git a/lib/VMCore/PassManagerT.h b/lib/VMCore/PassManagerT.h index 6c60a2d022d..95e0f563c94 100644 --- a/lib/VMCore/PassManagerT.h +++ b/lib/VMCore/PassManagerT.h @@ -23,9 +23,9 @@ #define LLVM_PASSMANAGER_T_H #include "llvm/Pass.h" -#include "Support/CommandLine.h" -#include "Support/LeakDetector.h" -#include "Support/Timer.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/LeakDetector.h" +#include "llvm/Support/Timer.h" #include #include diff --git a/lib/VMCore/SymbolTable.cpp b/lib/VMCore/SymbolTable.cpp index afbb0b1c21d..e5191be198b 100644 --- a/lib/VMCore/SymbolTable.cpp +++ b/lib/VMCore/SymbolTable.cpp @@ -15,7 +15,7 @@ #include "llvm/SymbolTable.h" #include "llvm/DerivedTypes.h" #include "llvm/Module.h" -#include "Support/StringExtras.h" +#include "llvm/ADT/StringExtras.h" #include #include diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index bd0da45f460..0c76d1604b8 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -15,9 +15,9 @@ #include "llvm/DerivedTypes.h" #include "llvm/SymbolTable.h" #include "llvm/Constants.h" -#include "Support/DepthFirstIterator.h" -#include "Support/StringExtras.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/StringExtras.h" +#include "llvm/ADT/STLExtras.h" #include #include using namespace llvm; diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp index e41c7fd1366..60be53db5b6 100644 --- a/lib/VMCore/Value.cpp +++ b/lib/VMCore/Value.cpp @@ -16,7 +16,7 @@ #include "llvm/DerivedTypes.h" #include "llvm/Constant.h" #include "llvm/GlobalValue.h" -#include "Support/LeakDetector.h" +#include "llvm/Support/LeakDetector.h" #include #include using namespace llvm; diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 9e99fe0136c..18d93383483 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -53,7 +53,7 @@ #include "llvm/Analysis/Dominators.h" #include "llvm/Support/CFG.h" #include "llvm/Support/InstVisitor.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/STLExtras.h" #include #include #include diff --git a/projects/Stacker/lib/compiler/StackerParser.y b/projects/Stacker/lib/compiler/StackerParser.y index 2256b30ccf7..40411d96280 100644 --- a/projects/Stacker/lib/compiler/StackerParser.y +++ b/projects/Stacker/lib/compiler/StackerParser.y @@ -16,8 +16,8 @@ #include "llvm/SymbolTable.h" #include "llvm/Module.h" #include "llvm/Instructions.h" -#include "Support/STLExtras.h" -#include "Support/DepthFirstIterator.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/DepthFirstIterator.h" #include #include #include diff --git a/projects/Stacker/lib/runtime/Makefile b/projects/Stacker/lib/runtime/Makefile index eaf1b482870..5f149ad4321 100644 --- a/projects/Stacker/lib/runtime/Makefile +++ b/projects/Stacker/lib/runtime/Makefile @@ -8,7 +8,8 @@ LEVEL=../../../.. # # Give the name of a library. This will build a dynamic version. # -SHARED_LIBRARY=1 +BYTECODE_LIBRARY=1 +DONT_BUILD_RELINKED=1 LIBRARYNAME=stkr_runtime # diff --git a/projects/Stacker/tools/stkrc/stkrc.cpp b/projects/Stacker/tools/stkrc/stkrc.cpp index c5d92e6c2ef..6006bb476e2 100644 --- a/projects/Stacker/tools/stkrc/stkrc.cpp +++ b/projects/Stacker/tools/stkrc/stkrc.cpp @@ -21,7 +21,7 @@ #include "llvm/Assembly/Parser.h" #include "llvm/Bytecode/Writer.h" #include "llvm/Analysis/Verifier.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include "llvm/System/Signals.h" #include #include diff --git a/projects/sample/lib/sample/sample.c b/projects/sample/lib/sample/sample.c index bd78ed57465..631a48d1ad1 100644 --- a/projects/sample/lib/sample/sample.c +++ b/projects/sample/lib/sample/sample.c @@ -11,7 +11,7 @@ #include // LLVM Header File -#include "Support/DataTypes.h" +#include "llvm/Support/DataTypes.h" // Header file global to this project #include "sample.h" diff --git a/runtime/libtrace/tracelib.c b/runtime/libtrace/tracelib.c index 5b4c7f68319..9de5c296b48 100644 --- a/runtime/libtrace/tracelib.c +++ b/runtime/libtrace/tracelib.c @@ -10,7 +10,7 @@ #include #include #include -#include "Support/DataTypes.h" +#include "llvm/Support/DataTypes.h" /*===---------------------------------------------------------------------===== * HASH FUNCTIONS diff --git a/tools/analyze/GraphPrinters.cpp b/tools/analyze/GraphPrinters.cpp index fc74c480cf2..1176a8df109 100644 --- a/tools/analyze/GraphPrinters.cpp +++ b/tools/analyze/GraphPrinters.cpp @@ -14,7 +14,7 @@ // //===----------------------------------------------------------------------===// -#include "Support/GraphWriter.h" +#include "llvm/Support/GraphWriter.h" #include "llvm/Pass.h" #include "llvm/Value.h" #include "llvm/Analysis/CallGraph.h" diff --git a/tools/analyze/PrintSCC.cpp b/tools/analyze/PrintSCC.cpp index 8911cc36e22..e4af831752c 100644 --- a/tools/analyze/PrintSCC.cpp +++ b/tools/analyze/PrintSCC.cpp @@ -29,7 +29,7 @@ #include "llvm/Module.h" #include "llvm/Analysis/CallGraph.h" #include "llvm/Support/CFG.h" -#include "Support/SCCIterator.h" +#include "llvm/ADT/SCCIterator.h" #include namespace llvm { diff --git a/tools/analyze/analyze.cpp b/tools/analyze/analyze.cpp index 0207b8c6e1a..1542a1a068a 100644 --- a/tools/analyze/analyze.cpp +++ b/tools/analyze/analyze.cpp @@ -24,8 +24,8 @@ #include "llvm/Target/TargetData.h" #include "llvm/Support/PassNameParser.h" #include "llvm/System/Signals.h" -#include "Support/PluginLoader.h" -#include "Support/Timer.h" +#include "llvm/Support/PluginLoader.h" +#include "llvm/Support/Timer.h" #include using namespace llvm; diff --git a/tools/bugpoint/BugDriver.cpp b/tools/bugpoint/BugDriver.cpp index 1826b7b780c..6d13f967118 100644 --- a/tools/bugpoint/BugDriver.cpp +++ b/tools/bugpoint/BugDriver.cpp @@ -20,8 +20,8 @@ #include "llvm/Bytecode/Reader.h" #include "llvm/Support/Linker.h" #include "llvm/Support/ToolRunner.h" -#include "Support/CommandLine.h" -#include "Support/FileUtilities.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/FileUtilities.h" #include #include diff --git a/tools/bugpoint/CrashDebugger.cpp b/tools/bugpoint/CrashDebugger.cpp index 69837f9c2a8..545d767c2ae 100644 --- a/tools/bugpoint/CrashDebugger.cpp +++ b/tools/bugpoint/CrashDebugger.cpp @@ -26,7 +26,7 @@ #include "llvm/Support/ToolRunner.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Utils/Cloning.h" -#include "Support/FileUtilities.h" +#include "llvm/Support/FileUtilities.h" #include #include using namespace llvm; diff --git a/tools/bugpoint/ExecutionDriver.cpp b/tools/bugpoint/ExecutionDriver.cpp index 62f0a242a6f..0687c4c08f3 100644 --- a/tools/bugpoint/ExecutionDriver.cpp +++ b/tools/bugpoint/ExecutionDriver.cpp @@ -14,10 +14,10 @@ #include "BugDriver.h" #include "llvm/Support/ToolRunner.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/FileUtilities.h" -#include "Support/SystemUtils.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/FileUtilities.h" +#include "llvm/Support/SystemUtils.h" #include using namespace llvm; diff --git a/tools/bugpoint/ExtractFunction.cpp b/tools/bugpoint/ExtractFunction.cpp index 7806857f2ef..cf02ef73a95 100644 --- a/tools/bugpoint/ExtractFunction.cpp +++ b/tools/bugpoint/ExtractFunction.cpp @@ -24,9 +24,9 @@ #include "llvm/Transforms/Utils/Cloning.h" #include "llvm/Transforms/Utils/FunctionUtils.h" #include "llvm/Target/TargetData.h" -#include "Support/CommandLine.h" -#include "Support/Debug.h" -#include "Support/FileUtilities.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/FileUtilities.h" #include using namespace llvm; diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp index 0b7711b611b..bead5dc9924 100644 --- a/tools/bugpoint/Miscompilation.cpp +++ b/tools/bugpoint/Miscompilation.cpp @@ -23,8 +23,8 @@ #include "llvm/Support/Mangler.h" #include "llvm/Transforms/Utils/Cloning.h" #include "llvm/Support/Linker.h" -#include "Support/CommandLine.h" -#include "Support/FileUtilities.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/FileUtilities.h" using namespace llvm; namespace llvm { diff --git a/tools/bugpoint/OptimizerDriver.cpp b/tools/bugpoint/OptimizerDriver.cpp index c5c437ccdb8..23e40fda5c3 100644 --- a/tools/bugpoint/OptimizerDriver.cpp +++ b/tools/bugpoint/OptimizerDriver.cpp @@ -21,7 +21,7 @@ #include "llvm/Analysis/Verifier.h" #include "llvm/Bytecode/WriteBytecodePass.h" #include "llvm/Target/TargetData.h" -#include "Support/FileUtilities.h" +#include "llvm/Support/FileUtilities.h" #include #include #include diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp index b694127e076..3dc98451de5 100644 --- a/tools/bugpoint/ToolRunner.cpp +++ b/tools/bugpoint/ToolRunner.cpp @@ -13,9 +13,9 @@ #define DEBUG_TYPE "toolrunner" #include "llvm/Support/ToolRunner.h" -#include "Config/config.h" // for HAVE_LINK_R -#include "Support/Debug.h" -#include "Support/FileUtilities.h" +#include "llvm/Config/config.h" // for HAVE_LINK_R +#include "llvm/Support/Debug.h" +#include "llvm/Support/FileUtilities.h" #include #include using namespace llvm; diff --git a/tools/bugpoint/ToolRunner.h b/tools/bugpoint/ToolRunner.h index bd085eab6d0..c5d89da46df 100644 --- a/tools/bugpoint/ToolRunner.h +++ b/tools/bugpoint/ToolRunner.h @@ -1,4 +1,4 @@ -//===-- Support/ToolRunner.h ------------------------------------*- C++ -*-===// +//===-- llvm/Support/ToolRunner.h -------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -14,10 +14,10 @@ // //===----------------------------------------------------------------------===// -#ifndef TOOLRUNNER_H -#define TOOLRUNNER_H +#ifndef LLVM_SUPPORT_TOOLRUNNER_H +#define LLVM_SUPPORT_TOOLRUNNER_H -#include "Support/SystemUtils.h" +#include "llvm/Support/SystemUtils.h" #include #include diff --git a/tools/bugpoint/bugpoint.cpp b/tools/bugpoint/bugpoint.cpp index 1ff84f24089..a4eae3cecd0 100644 --- a/tools/bugpoint/bugpoint.cpp +++ b/tools/bugpoint/bugpoint.cpp @@ -16,11 +16,12 @@ #include "BugDriver.h" #include "llvm/Support/PassNameParser.h" #include "llvm/Support/ToolRunner.h" -#include "Support/CommandLine.h" +#include "llvm/System/SysConfig.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/PluginLoader.h" #include "llvm/System/Signals.h" -#include "Support/PluginLoader.h" -#include "Config/unistd.h" -#include +#include "llvm/Config/unistd.h" +//#include using namespace llvm; static cl::list @@ -45,14 +46,8 @@ int main(int argc, char **argv) { D.addPasses(PassList.begin(), PassList.end()); // Bugpoint has the ability of generating a plethora of core files, so to - // avoid filling up the disk, set the max core file size to 0. - struct rlimit rlim; - rlim.rlim_cur = rlim.rlim_max = 0; - int res = setrlimit(RLIMIT_CORE, &rlim); - if (res < 0) { - // setrlimit() may have failed, but we're not going to let that stop us - perror("setrlimit: RLIMIT_CORE"); - } + // avoid filling up the disk, we prevent it + sys::PreventCoreFiles(); try { return D.run(); diff --git a/tools/extract/extract.cpp b/tools/extract/extract.cpp index 050793b2e69..95822d03899 100644 --- a/tools/extract/extract.cpp +++ b/tools/extract/extract.cpp @@ -18,7 +18,7 @@ #include "llvm/Bytecode/WriteBytecodePass.h" #include "llvm/Transforms/IPO.h" #include "llvm/Target/TargetData.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include "llvm/System/Signals.h" #include #include diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp index c5f6c2395ac..ab64bbf18fc 100644 --- a/tools/gccas/gccas.cpp +++ b/tools/gccas/gccas.cpp @@ -22,7 +22,7 @@ #include "llvm/Target/TargetData.h" #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/Scalar.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include "llvm/System/Signals.h" #include #include diff --git a/tools/gccld/GenerateCode.cpp b/tools/gccld/GenerateCode.cpp index 029d5b90fdc..633517d09d3 100644 --- a/tools/gccld/GenerateCode.cpp +++ b/tools/gccld/GenerateCode.cpp @@ -24,8 +24,8 @@ #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Support/Linker.h" -#include "Support/SystemUtils.h" -#include "Support/CommandLine.h" +#include "llvm/Support/SystemUtils.h" +#include "llvm/Support/CommandLine.h" using namespace llvm; namespace { diff --git a/tools/gccld/Linker.cpp b/tools/gccld/Linker.cpp index fcaa7af3d5f..fa9ec70306c 100644 --- a/tools/gccld/Linker.cpp +++ b/tools/gccld/Linker.cpp @@ -21,11 +21,11 @@ #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Support/Linker.h" -#include "Config/config.h" -#include "Support/CommandLine.h" -#include "Support/FileUtilities.h" +#include "llvm/Config/config.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/FileUtilities.h" #include "llvm/System/Signals.h" -#include "Support/SystemUtils.h" +#include "llvm/Support/SystemUtils.h" #include #include #include diff --git a/tools/gccld/gccld.cpp b/tools/gccld/gccld.cpp index ba4681534d8..9137124f19a 100644 --- a/tools/gccld/gccld.cpp +++ b/tools/gccld/gccld.cpp @@ -29,10 +29,10 @@ #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Support/Linker.h" -#include "Support/CommandLine.h" -#include "Support/FileUtilities.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/FileUtilities.h" #include "llvm/System/Signals.h" -#include "Support/SystemUtils.h" +#include "llvm/Support/SystemUtils.h" #include #include using namespace llvm; diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 0d35ea20aa1..4e1e0cce7bb 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -20,8 +20,8 @@ #include "llvm/Module.h" #include "llvm/PassManager.h" #include "llvm/Pass.h" -#include "Support/CommandLine.h" -#include "Support/PluginLoader.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/PluginLoader.h" #include "llvm/System/Signals.h" #include #include diff --git a/tools/llee/ExecveHandler.c b/tools/llee/ExecveHandler.c index 088f1dba535..89d15365385 100644 --- a/tools/llee/ExecveHandler.c +++ b/tools/llee/ExecveHandler.c @@ -13,7 +13,7 @@ \*===----------------------------------------------------------------------===*/ #include "SysUtils.h" -#include "Config/unistd.h" +#include "llvm/Config/unistd.h" #include #include #include diff --git a/tools/llee/OSInterface.h b/tools/llee/OSInterface.h index 26b48fd1af5..0e026e10b14 100644 --- a/tools/llee/OSInterface.h +++ b/tools/llee/OSInterface.h @@ -16,7 +16,7 @@ #ifndef OS_INTERFACE_H #define OS_INTERFACE_H -#include "Config/sys/types.h" +#include "llvm/Config/sys/types.h" struct stat; diff --git a/tools/llee/StorageProxy.c b/tools/llee/StorageProxy.c index 656d3164cfc..05ffdf4b4c7 100644 --- a/tools/llee/StorageProxy.c +++ b/tools/llee/StorageProxy.c @@ -7,10 +7,10 @@ #include "OSInterface.h" #include "SysUtils.h" -#include "Config/fcntl.h" -#include "Config/unistd.h" -#include "Config/sys/types.h" -#include "Config/sys/stat.h" +#include "llvm/Config/fcntl.h" +#include "llvm/Config/unistd.h" +#include "llvm/Config/sys/types.h" +#include "llvm/Config/sys/stat.h" #include #include #include diff --git a/tools/llee/SysUtils.c b/tools/llee/SysUtils.c index d7bab1d989d..0325c40b9d7 100644 --- a/tools/llee/SysUtils.c +++ b/tools/llee/SysUtils.c @@ -13,12 +13,12 @@ \*===----------------------------------------------------------------------===*/ #include "SysUtils.h" -#include "Config/dlfcn.h" -#include "Config/fcntl.h" -#include "Config/unistd.h" -#include "Config/sys/stat.h" -#include "Config/sys/types.h" -#include "Config/sys/wait.h" +#include "llvm/Config/dlfcn.h" +#include "llvm/Config/fcntl.h" +#include "llvm/Config/unistd.h" +#include "llvm/Config/sys/stat.h" +#include "llvm/Config/sys/types.h" +#include "llvm/Config/sys/wait.h" #include #include #include diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index 066bfbc9e9d..eb8ac0126e9 100644 --- a/tools/lli/lli.cpp +++ b/tools/lli/lli.cpp @@ -19,8 +19,8 @@ #include "llvm/Bytecode/Reader.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/GenericValue.h" -#include "Support/CommandLine.h" -#include "Support/PluginLoader.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/PluginLoader.h" #include "llvm/System/Signals.h" #include diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp index 4b79cd367d8..07fc1810e82 100644 --- a/tools/llvm-ar/llvm-ar.cpp +++ b/tools/llvm-ar/llvm-ar.cpp @@ -13,8 +13,8 @@ #include "llvm/Module.h" #include "llvm/Bytecode/Reader.h" -#include "Support/CommandLine.h" -#include "Support/FileUtilities.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/FileUtilities.h" #include "llvm/System/Signals.h" #include #include diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp index b49702c32ee..1d48f7a7fa1 100644 --- a/tools/llvm-as/llvm-as.cpp +++ b/tools/llvm-as/llvm-as.cpp @@ -19,7 +19,7 @@ #include "llvm/Assembly/Parser.h" #include "llvm/Bytecode/Writer.h" #include "llvm/Analysis/Verifier.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include "llvm/System/Signals.h" #include #include diff --git a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp index e3dff659d2f..d4be138fe77 100644 --- a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp +++ b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp @@ -31,7 +31,7 @@ #include "llvm/Analysis/Verifier.h" #include "llvm/Bytecode/Analyzer.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include "llvm/System/Signals.h" #include #include diff --git a/tools/llvm-db/CLIDebugger.cpp b/tools/llvm-db/CLIDebugger.cpp index c48a919f80a..75798d23527 100644 --- a/tools/llvm-db/CLIDebugger.cpp +++ b/tools/llvm-db/CLIDebugger.cpp @@ -15,7 +15,7 @@ #include "CLIDebugger.h" #include "CLICommand.h" #include "llvm/Debugger/SourceFile.h" -#include "Support/StringExtras.h" +#include "llvm/ADT/StringExtras.h" #include using namespace llvm; diff --git a/tools/llvm-db/Commands.cpp b/tools/llvm-db/Commands.cpp index 56dbd53526c..6df2f693a16 100644 --- a/tools/llvm-db/Commands.cpp +++ b/tools/llvm-db/Commands.cpp @@ -18,8 +18,8 @@ #include "llvm/Debugger/SourceLanguage.h" #include "llvm/Debugger/SourceFile.h" #include "llvm/Debugger/InferiorProcess.h" -#include "Support/FileUtilities.h" -#include "Support/StringExtras.h" +#include "llvm/Support/FileUtilities.h" +#include "llvm/ADT/StringExtras.h" #include using namespace llvm; diff --git a/tools/llvm-db/llvm-db.cpp b/tools/llvm-db/llvm-db.cpp index 1b7385c0658..23cbca2ef4f 100644 --- a/tools/llvm-db/llvm-db.cpp +++ b/tools/llvm-db/llvm-db.cpp @@ -13,8 +13,8 @@ //===----------------------------------------------------------------------===// #include "CLIDebugger.h" -#include "Support/CommandLine.h" -#include "Support/PluginLoader.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/PluginLoader.h" #include "llvm/System/Signals.h" #include diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp index ac8101b6c42..37d5c84f751 100644 --- a/tools/llvm-dis/llvm-dis.cpp +++ b/tools/llvm-dis/llvm-dis.cpp @@ -20,7 +20,7 @@ #include "llvm/PassManager.h" #include "llvm/Bytecode/Reader.h" #include "llvm/Assembly/PrintModulePass.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include "llvm/System/Signals.h" #include #include diff --git a/tools/llvm-extract/llvm-extract.cpp b/tools/llvm-extract/llvm-extract.cpp index 050793b2e69..95822d03899 100644 --- a/tools/llvm-extract/llvm-extract.cpp +++ b/tools/llvm-extract/llvm-extract.cpp @@ -18,7 +18,7 @@ #include "llvm/Bytecode/WriteBytecodePass.h" #include "llvm/Transforms/IPO.h" #include "llvm/Target/TargetData.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include "llvm/System/Signals.h" #include #include diff --git a/tools/llvm-link/llvm-link.cpp b/tools/llvm-link/llvm-link.cpp index 3cd3c7b54dd..664529850c5 100644 --- a/tools/llvm-link/llvm-link.cpp +++ b/tools/llvm-link/llvm-link.cpp @@ -17,8 +17,8 @@ #include "llvm/Bytecode/Reader.h" #include "llvm/Bytecode/Writer.h" #include "llvm/Support/Linker.h" -#include "Support/CommandLine.h" -#include "Support/FileUtilities.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/FileUtilities.h" #include "llvm/System/Signals.h" #include #include diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp index ba8b5d7f0d5..1a2b40e9c9b 100644 --- a/tools/llvm-nm/llvm-nm.cpp +++ b/tools/llvm-nm/llvm-nm.cpp @@ -18,8 +18,8 @@ #include "llvm/Module.h" #include "llvm/Bytecode/Reader.h" -#include "Support/CommandLine.h" -#include "Support/FileUtilities.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/FileUtilities.h" #include "llvm/System/Signals.h" #include #include diff --git a/tools/llvm-prof/llvm-prof.cpp b/tools/llvm-prof/llvm-prof.cpp index efb44d69b5c..88344078bda 100644 --- a/tools/llvm-prof/llvm-prof.cpp +++ b/tools/llvm-prof/llvm-prof.cpp @@ -18,7 +18,7 @@ #include "llvm/Assembly/AsmAnnotationWriter.h" #include "llvm/Analysis/ProfileInfoLoader.h" #include "llvm/Bytecode/Reader.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include "llvm/System/Signals.h" #include #include diff --git a/tools/llvm-stub/llvm-stub.c b/tools/llvm-stub/llvm-stub.c index a64c5df9f47..8d5175af100 100644 --- a/tools/llvm-stub/llvm-stub.c +++ b/tools/llvm-stub/llvm-stub.c @@ -23,7 +23,7 @@ #include #include #include -#include "Config/unistd.h" /* provides definition of execve */ +#include "llvm/Config/unistd.h" /* provides definition of execve */ int main(int argc, char** argv) { const char *Interp = getenv("LLVMINTERP"); diff --git a/tools/llvmc/CompilerDriver.cpp b/tools/llvmc/CompilerDriver.cpp index 51164d24678..c015d9e867a 100644 --- a/tools/llvmc/CompilerDriver.cpp +++ b/tools/llvmc/CompilerDriver.cpp @@ -17,9 +17,9 @@ #include "llvm/Module.h" #include "llvm/Bytecode/Reader.h" #include "llvm/System/Signals.h" -#include "Support/FileUtilities.h" -#include "Support/SetVector.h" -#include "Support/StringExtras.h" +#include "llvm/Support/FileUtilities.h" +#include "llvm/ADT/SetVector.h" +#include "llvm/ADT/StringExtras.h" #include using namespace llvm; diff --git a/tools/llvmc/Configuration.cpp b/tools/llvmc/Configuration.cpp index c398e529d74..6b5d33975f2 100644 --- a/tools/llvmc/Configuration.cpp +++ b/tools/llvmc/Configuration.cpp @@ -15,9 +15,9 @@ #include "Configuration.h" #include "ConfigLexer.h" #include "CompilerDriver.h" -#include "Config/config.h" -#include "Support/CommandLine.h" -#include "Support/StringExtras.h" +#include "llvm/Config/config.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/ADT/StringExtras.h" #include #include diff --git a/tools/llvmc/Configuration.h b/tools/llvmc/Configuration.h index 2ed565a80ed..e194dd072ef 100644 --- a/tools/llvmc/Configuration.h +++ b/tools/llvmc/Configuration.h @@ -15,7 +15,7 @@ #define LLVM_TOOLS_LLVMC_CONFIGDATA_H #include "CompilerDriver.h" -#include +#include namespace llvm { /// This class provides the high level interface to the LLVM Compiler Driver. diff --git a/tools/llvmc/llvmc.cpp b/tools/llvmc/llvmc.cpp index 8dab3017908..f457795a0c7 100644 --- a/tools/llvmc/llvmc.cpp +++ b/tools/llvmc/llvmc.cpp @@ -18,7 +18,7 @@ #include "Configuration.h" #include "llvm/Pass.h" #include "llvm/System/Signals.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include using namespace llvm; diff --git a/tools/opt/GraphPrinters.cpp b/tools/opt/GraphPrinters.cpp index fc74c480cf2..1176a8df109 100644 --- a/tools/opt/GraphPrinters.cpp +++ b/tools/opt/GraphPrinters.cpp @@ -14,7 +14,7 @@ // //===----------------------------------------------------------------------===// -#include "Support/GraphWriter.h" +#include "llvm/Support/GraphWriter.h" #include "llvm/Pass.h" #include "llvm/Value.h" #include "llvm/Analysis/CallGraph.h" diff --git a/tools/opt/PrintSCC.cpp b/tools/opt/PrintSCC.cpp index 8911cc36e22..e4af831752c 100644 --- a/tools/opt/PrintSCC.cpp +++ b/tools/opt/PrintSCC.cpp @@ -29,7 +29,7 @@ #include "llvm/Module.h" #include "llvm/Analysis/CallGraph.h" #include "llvm/Support/CFG.h" -#include "Support/SCCIterator.h" +#include "llvm/ADT/SCCIterator.h" #include namespace llvm { diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 4810ebd8703..f5666bc08e6 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -21,8 +21,8 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Support/PassNameParser.h" #include "llvm/System/Signals.h" -#include "Support/PluginLoader.h" -#include "Support/SystemUtils.h" +#include "llvm/Support/PluginLoader.h" +#include "llvm/Support/SystemUtils.h" #include #include #include diff --git a/utils/TableGen/CodeEmitterGen.cpp b/utils/TableGen/CodeEmitterGen.cpp index 906f4d6c724..dcf10672a3a 100644 --- a/utils/TableGen/CodeEmitterGen.cpp +++ b/utils/TableGen/CodeEmitterGen.cpp @@ -16,7 +16,7 @@ #include "CodeEmitterGen.h" #include "CodeGenTarget.h" #include "Record.h" -#include "Support/Debug.h" +#include "llvm/Support/Debug.h" using namespace llvm; void CodeEmitterGen::run(std::ostream &o) { diff --git a/utils/TableGen/FileParser.y b/utils/TableGen/FileParser.y index bf10abc8be7..8781049956b 100644 --- a/utils/TableGen/FileParser.y +++ b/utils/TableGen/FileParser.y @@ -13,7 +13,7 @@ %{ #include "Record.h" -#include "Support/StringExtras.h" +#include "llvm/ADT/StringExtras.h" #include #include #define YYERROR_VERBOSE 1 diff --git a/utils/TableGen/InstrSelectorEmitter.cpp b/utils/TableGen/InstrSelectorEmitter.cpp index f6ca2a22e46..9a2ce4a6e87 100644 --- a/utils/TableGen/InstrSelectorEmitter.cpp +++ b/utils/TableGen/InstrSelectorEmitter.cpp @@ -14,8 +14,8 @@ #include "InstrSelectorEmitter.h" #include "Record.h" -#include "Support/Debug.h" -#include "Support/StringExtras.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/StringExtras.h" #include using namespace llvm; diff --git a/utils/TableGen/RegisterInfoEmitter.cpp b/utils/TableGen/RegisterInfoEmitter.cpp index ef79c35017e..487890d374d 100644 --- a/utils/TableGen/RegisterInfoEmitter.cpp +++ b/utils/TableGen/RegisterInfoEmitter.cpp @@ -17,8 +17,8 @@ #include "CodeGenTarget.h" #include "CodeGenRegisters.h" #include "Record.h" -#include "Support/StringExtras.h" -#include "Support/STLExtras.h" +#include "llvm/ADT/StringExtras.h" +#include "llvm/ADT/STLExtras.h" #include using namespace llvm; diff --git a/utils/TableGen/TableGen.cpp b/utils/TableGen/TableGen.cpp index 14e2352ece1..15b313191e5 100644 --- a/utils/TableGen/TableGen.cpp +++ b/utils/TableGen/TableGen.cpp @@ -16,9 +16,9 @@ //===----------------------------------------------------------------------===// #include "Record.h" -#include "Support/CommandLine.h" +#include "llvm/Support/CommandLine.h" #include "llvm/System/Signals.h" -#include "Support/FileUtilities.h" +#include "llvm/Support/FileUtilities.h" #include "CodeEmitterGen.h" #include "RegisterInfoEmitter.h" #include "InstrInfoEmitter.h" diff --git a/utils/fpcmp/fpcmp.cpp b/utils/fpcmp/fpcmp.cpp index e45c3c0a276..ff93b9bc49e 100644 --- a/utils/fpcmp/fpcmp.cpp +++ b/utils/fpcmp/fpcmp.cpp @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// -#include "Support/CommandLine.h" -#include "Support/FileUtilities.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/FileUtilities.h" #include #include