diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-09-11 01:17:24 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-09-11 01:17:24 +0000 |
commit | 7b617158dba128156141982c1a9a944263729dcc (patch) | |
tree | d553828e02750a7164ce231c5bcbd8aea0bb9089 /lib/Support | |
parent | 78e5efe1b202f71975ad93f33b1fda21d83fd1fb (diff) | |
download | external_llvm-7b617158dba128156141982c1a9a944263729dcc.zip external_llvm-7b617158dba128156141982c1a9a944263729dcc.tar.gz external_llvm-7b617158dba128156141982c1a9a944263729dcc.tar.bz2 |
Add support for finding cacheflush on OpenBSD/mips64 platforms.
Patch by Brad Smith!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163584 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/Memory.cpp | 4 | ||||
-rw-r--r-- | lib/Support/Unix/Memory.inc | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/Support/Memory.cpp b/lib/Support/Memory.cpp index 22f7494..3cc8f5e 100644 --- a/lib/Support/Memory.cpp +++ b/lib/Support/Memory.cpp @@ -16,10 +16,6 @@ #include "llvm/Support/Valgrind.h" #include "llvm/Config/config.h" -#if defined(__mips__) -#include <sys/cachectl.h> -#endif - namespace llvm { using namespace sys; } diff --git a/lib/Support/Unix/Memory.inc b/lib/Support/Unix/Memory.inc index 5a57a28..2e301f6 100644 --- a/lib/Support/Unix/Memory.inc +++ b/lib/Support/Unix/Memory.inc @@ -23,6 +23,14 @@ #include <mach/mach.h> #endif +#if defined(__mips__) +# if defined(__OpenBSD__) +# include <mips64/sysarch.h> +# else +# include <sys/cachectl.h> +# endif +#endif + /// AllocateRWX - 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 |