diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-09-01 22:55:40 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-09-01 22:55:40 +0000 |
commit | 551ccae044b0ff658fe629dd67edd5ffe75d10e8 (patch) | |
tree | d7fa643a1f1f12dbc4ee049bcc7a032a49b17d51 /include/Config/pagesize.h | |
parent | ed543731fb385b55750d0c514d130a810339d739 (diff) | |
download | external_llvm-551ccae044b0ff658fe629dd67edd5ffe75d10e8.zip external_llvm-551ccae044b0ff658fe629dd67edd5ffe75d10e8.tar.gz external_llvm-551ccae044b0ff658fe629dd67edd5ffe75d10e8.tar.bz2 |
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
Diffstat (limited to 'include/Config/pagesize.h')
-rw-r--r-- | include/Config/pagesize.h | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/include/Config/pagesize.h b/include/Config/pagesize.h deleted file mode 100644 index f37b297..0000000 --- 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 <sys/param.h> - -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 |