summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2014-09-22 21:40:15 +0000
committerYaron Keren <yaron.keren@gmail.com>2014-09-22 21:40:15 +0000
commitfb069089895666145393d2c2e563ec986d33234e (patch)
tree295167fd3386d116f1a788a35a50aa990fecc867 /llvm/lib/Support
parent27e959d7b2cf031cc942e5cce8b0583cd7dbd318 (diff)
downloadbcm5719-llvm-fb069089895666145393d2c2e563ec986d33234e.tar.gz
bcm5719-llvm-fb069089895666145393d2c2e563ec986d33234e.zip
In this callback ModuleName includes the file path.
Comparing ModuleName to the file names listed will always fail. I wonder how this code ever worked and what its purpose was. Why exclude the msvc runtime DLLs but not exclude all Windows system DLLs? Anyhow, it does not function as intended. clang-formatted as well. llvm-svn: 218276
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/Windows/DynamicLibrary.inc31
1 files changed, 5 insertions, 26 deletions
diff --git a/llvm/lib/Support/Windows/DynamicLibrary.inc b/llvm/lib/Support/Windows/DynamicLibrary.inc
index 5ed0b709fa6..95d7ba1699f 100644
--- a/llvm/lib/Support/Windows/DynamicLibrary.inc
+++ b/llvm/lib/Support/Windows/DynamicLibrary.inc
@@ -41,32 +41,11 @@ using namespace sys;
static DenseSet<HMODULE> *OpenedHandles;
-extern "C" {
-
- static BOOL CALLBACK ELM_Callback(WIN32_ELMCB_PCSTR ModuleName,
- ULONG_PTR ModuleBase,
- ULONG ModuleSize,
- PVOID UserContext)
- {
- // Ignore VC++ runtimes prior to 7.1. Somehow some of them get loaded
- // into the process.
- if (stricmp(ModuleName, "msvci70") != 0 &&
- stricmp(ModuleName, "msvcirt") != 0 &&
- stricmp(ModuleName, "msvcp50") != 0 &&
- stricmp(ModuleName, "msvcp60") != 0 &&
- stricmp(ModuleName, "msvcp70") != 0 &&
- stricmp(ModuleName, "msvcr70") != 0 &&
-#ifndef __MINGW32__
- // Mingw32 uses msvcrt.dll by default. Don't ignore it.
- // Otherwise the user should be aware what they are doing.
- stricmp(ModuleName, "msvcrt") != 0 &&
-#endif
- stricmp(ModuleName, "msvcrt20") != 0 &&
- stricmp(ModuleName, "msvcrt40") != 0) {
- OpenedHandles->insert((HMODULE)ModuleBase);
- }
- return TRUE;
- }
+extern "C" static BOOL CALLBACK
+ELM_Callback(WIN32_ELMCB_PCSTR ModuleName, ULONG_PTR ModuleBase,
+ ULONG ModuleSize, PVOID UserContext) {
+ OpenedHandles->insert((HMODULE)ModuleBase);
+ return TRUE;
}
DynamicLibrary DynamicLibrary::getPermanentLibrary(const char *filename,
OpenPOWER on IntegriCloud