Various small changes for build of LLDB on Visual Studio 2013 RC (MSVC12)

llvm-svn: 191116
This commit is contained in:
Virgile Bello 2013-09-20 22:35:22 +00:00
parent 1fd7ec75fc
commit 6957195ae5
6 changed files with 27 additions and 1 deletions

View File

@ -12,6 +12,7 @@
// C Includes
#include <stdint.h>
#ifndef _MSC_VER
#include <sys/time.h>
// BEGIN: MinGW work around
@ -19,6 +20,7 @@
#include <pthread.h>
#endif
// END: MinGW work around
#endif
// C++ Includes
// Other libraries and framework includes

View File

@ -34,7 +34,7 @@ public:
const char *description;
};
typedef UniqueCStringMap<EnumeratorInfo> EnumerationMap;
typedef typename EnumerationMap::Entry EnumerationMapEntry;
typedef EnumerationMap::Entry EnumerationMapEntry;
OptionValueEnumeration (const OptionEnumValueElement *enumerators, enum_type value);

View File

@ -114,6 +114,11 @@
#define MAX_PATH 260
#endif
#ifdef _MSC_VER
// ignore GCC function attributes
#define __attribute__(X)
#endif
#if defined(__cplusplus)
//----------------------------------------------------------------------

View File

@ -35,8 +35,10 @@
// things should be defined. Currently MacOSX is being assumed by default
// since that is what lldb was first developed for.
#ifndef _MSC_VER
#include <stdbool.h>
#include <unistd.h>
#endif
#ifdef _WIN32

View File

@ -14,7 +14,9 @@
#include "lldb/Host/windows/windows.h"
#endif
#include <fcntl.h>
#ifndef _MSC_VER
#include <libgen.h>
#endif
#include <sys/stat.h>
#include <set>
#include <string.h>

View File

@ -14,6 +14,11 @@
#include <stddef.h>
#include <time.h>
#include <cstring>
#ifdef _MSC_VER
#include "lldb/Host/windows/windows.h"
#endif
// C++ Includes
// Other libraries and framework includes
// Project includes
@ -119,10 +124,20 @@ TimeValue
TimeValue::Now()
{
uint32_t seconds, nanoseconds;
#if _MSC_VER
SYSTEMTIME st;
GetSystemTime(&st);
nanoseconds = st.wMilliseconds * 1000000;
FILETIME ft;
SystemTimeToFileTime(&st, &ft);
seconds = ((((uint64_t)ft.dwHighDateTime) << 32 | ft.dwLowDateTime) / 10000000) - 11644473600ULL;
#else
struct timeval tv;
gettimeofday(&tv, NULL);
seconds = tv.tv_sec;
nanoseconds = tv.tv_usec * NanoSecPerMicroSec;
#endif
TimeValue now(seconds, nanoseconds);
return now;
}