Fix build problems with remote lli implementation
authorAndrew Kaylor <andrew.kaylor@intel.com>
Wed, 2 Oct 2013 19:26:16 +0000 (19:26 +0000)
committerAndrew Kaylor <andrew.kaylor@intel.com>
Wed, 2 Oct 2013 19:26:16 +0000 (19:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191848 91177308-0d34-0410-b5e6-96231b3b80d8

tools/lli/ChildTarget/Unix/ChildTarget.inc

index 9550e508d62bdacad1f95d57f36aa7b8ca9dd247..cd42f34edd53af214fe48e78971751023c470ffd 100644 (file)
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
+
+#ifdef HAVE_SYS_MMAN_H
 #include <sys/mman.h>
+#endif
+
+#ifdef __APPLE__
+#include <mach/mach.h>
+#endif
+
+#if defined(__mips__)
+#  if defined(__OpenBSD__)
+#    include <mips64/sysarch.h>
+#  else
+#    include <sys/cachectl.h>
+#  endif
+#endif
+
+#ifdef __APPLE__
+extern "C" void sys_icache_invalidate(const void *Addr, size_t len);
+#else
+extern "C" void __clear_cache(void *, void*);
+#endif
 
 namespace {