From 07b57d26263057daa703ddda980ac16e6da8c950 Mon Sep 17 00:00:00 2001 From: Chuck Rose III Date: Wed, 21 Nov 2007 00:37:56 +0000 Subject: This change does a couple of things. First it gets the Visual Studio builds working. I added the lexing files to the VStudio projects and removed the .l files from the VStudio projects. There was a problem with use of strtoll in TGLexer.cpp and Chris suggested switching to strtol, so that's included here. Additionally, this checkin adds minimal x64 builds to the VStudio builds. Build issues related to x64 in the windows specific files for DynamicLibrary.inc and Singals.inc are worked around, but not ultimately solved. Binaries used to be stored in ...\win32\{Debug|Release} but are now kept in ...\win32\bin\{win32|x64}\{Debug|Release} intermediate files will continue to be stored in the individual project directories under win32. Some names will likely change in the future to reflect that the vstudio projects are no longer 32-bit only, but I wanted to get things up and running today so kept away from bigger restructuring. llvm-svn: 44260 --- llvm/lib/System/Win32/DynamicLibrary.inc | 8 +++++++- llvm/lib/System/Win32/Signals.inc | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'llvm/lib') diff --git a/llvm/lib/System/Win32/DynamicLibrary.inc b/llvm/lib/System/Win32/DynamicLibrary.inc index 251131e5dfb..83c67dcfd99 100644 --- a/llvm/lib/System/Win32/DynamicLibrary.inc +++ b/llvm/lib/System/Win32/DynamicLibrary.inc @@ -37,9 +37,15 @@ using namespace sys; static std::vector OpenedHandles; +#ifdef _WIN64 + typedef DWORD64 ModuleBaseType; +#else + typedef ULONG ModuleBaseType; +#endif + extern "C" { static BOOL CALLBACK ELM_Callback(PSTR ModuleName, - ULONG ModuleBase, + ModuleBaseType ModuleBase, ULONG ModuleSize, PVOID UserContext) { diff --git a/llvm/lib/System/Win32/Signals.inc b/llvm/lib/System/Win32/Signals.inc index 7da0c751136..399717ade7a 100644 --- a/llvm/lib/System/Win32/Signals.inc +++ b/llvm/lib/System/Win32/Signals.inc @@ -177,7 +177,11 @@ static void Cleanup() { static LONG WINAPI LLVMUnhandledExceptionFilter(LPEXCEPTION_POINTERS ep) { try { Cleanup(); - + +#ifdef _WIN64 + // TODO: provide a x64 friendly version of the following +#else + // Initialize the STACKFRAME structure. STACKFRAME StackFrame; memset(&StackFrame, 0, sizeof(StackFrame)); @@ -251,6 +255,9 @@ static LONG WINAPI LLVMUnhandledExceptionFilter(LPEXCEPTION_POINTERS ep) { fputc('\n', stderr); } + +#endif + } catch (...) { assert(!"Crashed in LLVMUnhandledExceptionFilter"); } -- cgit v1.2.3