<div dir="ltr">Hi all,<div>  Here is another patch to fix building compiler-rt/lib/profile with MSVC.</div><div><br></div><div>MSVC does not do pointer math on void* (InstrProfilingPlatformOther.c lines 37 and 39), and so the types of NamePtr and CounterPtr should be mentioned explicitly.</div><div>Is there a reason why "IntPtrT" was used instead of specifying the types as is done in this patch? The LLVM calls (getInt8PtrTy) also explicitly contain the type size.</div><div><br></div><div>With this patch, trunk works with MSVC, with these two remaining issues:</div><div>1. GCDAProfiling.c does not compile, because it includes <sys/mman.h> and <sys/file.h> that are not available with MSVC.</div><div>2. COMPILER_RT_HAS_ATOMICS should not be 1 for MSVC. Unfortunately, MSVC does not have a drop-in replacement for GCC's __sync_bool_compare_and_swap, and so a fix is non-trivial.</div><div><br></div><div><div>Thanks,</div><div>  Johan</div></div><div><br></div></div>