[llvm-commits] [PATCH] Use proper header for OpenBSD/mips64 to find cacheflush()
Brad Smith
brad at comstyle.com
Fri Sep 7 14:20:50 PDT 2012
On Mon, Sep 03, 2012 at 11:23:29AM +0200, Duncan Sands wrote:
> Hi Brad,
>
> On 29/08/12 17:57, Brad Smith wrote:
> >On Tue, Aug 21, 2012 at 04:24:58PM -0400, Brad Smith wrote:
> >>The following patch allows the code in lib/Support/Memory.cpp to find
> >>cacheflush() on OpenBSD/mips64.
>
> maybe all of this should be moved to lib/Support/Unix/Memory.inc?
>
> Ciao, Duncan.
Then how about the attached revised diff.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
-------------- next part --------------
Index: lib/Support/Memory.cpp
===================================================================
--- lib/Support/Memory.cpp (revision 163419)
+++ lib/Support/Memory.cpp (working copy)
@@ -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;
}
Index: lib/Support/Unix/Memory.inc
===================================================================
--- lib/Support/Unix/Memory.inc (revision 163419)
+++ lib/Support/Unix/Memory.inc (working copy)
@@ -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