llvm.org GIT mirror llvm / 14c762d
add some #includes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49036 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 11 years ago
1 changed file(s) with 8 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
2222 #endif
2323 #if HAVE_FCNTL_H
2424 #include
25 #endif
26 #ifdef HAVE_SYS_MMAN_H
27 #include
28 #endif
29 #ifdef HAVE_SYS_STAT_H
30 #include
2531 #endif
2632 #if HAVE_UTIME_H
2733 #include
752758 void *BasePtr = ::mmap(0, FileSize, PROT_READ, Flags, FD, 0);
753759 if (BasePtr == MAP_FAILED)
754760 return 0;
755 return BasePtr;
761 return (const char*)BasePtr;
756762 }
757763
758764 void Path::UnMapFilePages(const char *BasePtr, uint64_t FileSize) {
759 ::munmap(BasePtr, FileSize);
765 ::munmap((void*)BasePtr, FileSize);
760766 }
761767
762768 } // end llvm namespace