summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System
diff options
context:
space:
mode:
authorStefanus Du Toit <stefanus.dutoit@rapidmind.com>2009-04-28 16:37:58 +0000
committerStefanus Du Toit <stefanus.dutoit@rapidmind.com>2009-04-28 16:37:58 +0000
commitd2b7be6e9b8439b76639bbf578405d5b2988461d (patch)
tree021e3e84017fed6052944501292fbbfa85886fd5 /llvm/lib/System
parentfb9e23b2173ce078bfb177f664305fe14ea92051 (diff)
downloadbcm5719-llvm-d2b7be6e9b8439b76639bbf578405d5b2988461d.tar.gz
bcm5719-llvm-d2b7be6e9b8439b76639bbf578405d5b2988461d.zip
Fix choice of version of Windows callback to use to consider not only the Visual Studio version, but also the Windows SDK version.
Patch by Tareq Siraj. llvm-svn: 70299
Diffstat (limited to 'llvm/lib/System')
-rw-r--r--llvm/lib/System/Win32/DynamicLibrary.inc13
1 files changed, 12 insertions, 1 deletions
diff --git a/llvm/lib/System/Win32/DynamicLibrary.inc b/llvm/lib/System/Win32/DynamicLibrary.inc
index 3c35e6c9695..1ddf6cea0b3 100644
--- a/llvm/lib/System/Win32/DynamicLibrary.inc
+++ b/llvm/lib/System/Win32/DynamicLibrary.inc
@@ -19,6 +19,10 @@
#include <dbghelp.h>
#endif
+#ifdef _MSC_VER
+ #include <ntverp.h>
+#endif
+
#ifdef __MINGW32__
#if (HAVE_LIBIMAGEHLP != 1)
#error "libimagehlp.a should be present"
@@ -44,7 +48,14 @@ static std::vector<HMODULE> OpenedHandles;
#endif
extern "C" {
-#if !defined(_MSC_VER) || _MSC_VER < 1500
+// Use old callback if:
+// - Not using Visual Studio
+// - Visual Studio 2005 or earlier but only if we are not using the Windows SDK
+// or Windows SDK version is older than 6.0
+// Use new callback if:
+// - Newer Visual Studio (comes with newer SDK).
+// - Visual Studio 2005 with Windows SDK 6.0+
+#if !defined(_MSC_VER) || _MSC_VER < 1500 && (!defined(VER_PRODUCTBUILD) || VER_PRODUCTBUILD < 6000)
static BOOL CALLBACK ELM_Callback(PSTR ModuleName,
ModuleBaseType ModuleBase,
ULONG ModuleSize,
OpenPOWER on IntegriCloud