This patch implements timeit timing tool found at tools/timeit.c for Windows.
It is required for compile time and run time calculations by the llvm-testsuite.
At this moment llvm testsuite tests can not be compiled with clang-cl MSVC combination
however we have also made required modifications to the cmake files to enable building
timeit on windows with clang-cl/cl.
In developer console with MSVC following command can be used to successfully build this code:
set CC=c:\\work\\llvm-dev\\build\\bin\\clang-cl.exe
set CXX=c:\\work\\llvm-dev\\build\\bin\\clang-cl.exe
cmake -G Ninja -DTEST_SUITE_SUBDIRS= ..\\llvm-test-suite
Hmm, I somewhat dislike having to hardcode defaults like this, but this probably is a better default (for both mingw and msvc/clang-cl environments) than cc on Windows anyway, so I guess it's fine - and it can be overridden with options.