[llvm-commits] [llvm] r163584 - in /llvm/trunk/lib/Support: Memory.cpp Unix/Memory.inc
Chandler Carruth
chandlerc at gmail.com
Mon Sep 10 18:17:25 PDT 2012
Author: chandlerc
Date: Mon Sep 10 20:17:24 2012
New Revision: 163584
URL: http://llvm.org/viewvc/llvm-project?rev=163584&view=rev
Log:
Add support for finding cacheflush on OpenBSD/mips64 platforms.
Patch by Brad Smith!
Modified:
llvm/trunk/lib/Support/Memory.cpp
llvm/trunk/lib/Support/Unix/Memory.inc
Modified: llvm/trunk/lib/Support/Memory.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Memory.cpp?rev=163584&r1=163583&r2=163584&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Memory.cpp (original)
+++ llvm/trunk/lib/Support/Memory.cpp Mon Sep 10 20:17:24 2012
@@ -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;
}
Modified: llvm/trunk/lib/Support/Unix/Memory.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Memory.inc?rev=163584&r1=163583&r2=163584&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Memory.inc (original)
+++ llvm/trunk/lib/Support/Unix/Memory.inc Mon Sep 10 20:17:24 2012
@@ -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
More information about the llvm-commits
mailing list