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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44260 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/System/Win32/DynamicLibrary.inc b/lib/System/Win32/DynamicLibrary.inc
index 251131e..83c67dc 100644
--- a/lib/System/Win32/DynamicLibrary.inc
+++ b/lib/System/Win32/DynamicLibrary.inc
@@ -37,9 +37,15 @@
static std::vector<HMODULE> 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/lib/System/Win32/Signals.inc b/lib/System/Win32/Signals.inc
index 7da0c75..399717a 100644
--- a/lib/System/Win32/Signals.inc
+++ b/lib/System/Win32/Signals.inc
@@ -177,7 +177,11 @@
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 @@
fputc('\n', stderr);
}
+
+#endif
+
} catch (...) {
assert(!"Crashed in LLVMUnhandledExceptionFilter");
}