Add support for finding cacheflush on OpenBSD/mips64 platforms.
authorChandler Carruth <chandlerc@gmail.com>
Tue, 11 Sep 2012 01:17:24 +0000 (01:17 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 11 Sep 2012 01:17:24 +0000 (01:17 +0000)
Patch by Brad Smith!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163584 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Memory.cpp
lib/Support/Unix/Memory.inc

index 22f74944865ca9cc5abd8310ded933f5dfd18cfb..3cc8f5ee7b37a14e7b7f110af9d8a498fac7a62e 100644 (file)
 #include "llvm/Support/Valgrind.h"
 #include "llvm/Config/config.h"
 
-#if defined(__mips__)
-#include <sys/cachectl.h>
-#endif
-
 namespace llvm {
 using namespace sys;
 }
index 5a57a28706368cedb510977faff88390f22ac99e..2e301f62f2be29316e638d2dda1266aa81e8129e 100644 (file)
 #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