[llvm] r262810 - Revert r130657, "Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may check the decl instead of the versions of individual libraries."
NAKAMURA Takumi via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 6 16:13:10 PST 2016
Author: chapuni
Date: Sun Mar 6 18:13:09 2016
New Revision: 262810
URL: http://llvm.org/viewvc/llvm-project?rev=262810&view=rev
Log:
Revert r130657, "Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may check the decl instead of the versions of individual libraries."
We may assume the type of 1st argument as PCSTR in PENUMLOADED_MODULES_CALLBACK. PSTR was in the ancient mingw32.
Modified:
llvm/trunk/cmake/config-ix.cmake
llvm/trunk/include/llvm/Config/config.h.cmake
llvm/trunk/lib/Support/Windows/DynamicLibrary.inc
llvm/trunk/lib/Support/Windows/Signals.inc
Modified: llvm/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=262810&r1=262809&r2=262810&view=diff
==============================================================================
--- llvm/trunk/cmake/config-ix.cmake (original)
+++ llvm/trunk/cmake/config-ix.cmake Sun Mar 6 18:13:09 2016
@@ -451,21 +451,6 @@ else()
set(HAVE_DIA_SDK 0)
endif( MSVC )
-if( PURE_WINDOWS )
- CHECK_CXX_SOURCE_COMPILES("
- #include <windows.h>
- #include <imagehlp.h>
- extern \"C\" void foo(PENUMLOADED_MODULES_CALLBACK);
- extern \"C\" void foo(BOOL(CALLBACK*)(PCSTR,ULONG_PTR,ULONG,PVOID));
- int main(){return 0;}"
- HAVE_ELMCB_PCSTR)
- if( HAVE_ELMCB_PCSTR )
- set(WIN32_ELMCB_PCSTR "PCSTR")
- else()
- set(WIN32_ELMCB_PCSTR "PSTR")
- endif()
-endif( PURE_WINDOWS )
-
# FIXME: Signal handler return type, currently hardcoded to 'void'
set(RETSIGTYPE void)
Modified: llvm/trunk/include/llvm/Config/config.h.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.cmake?rev=262810&r1=262809&r2=262810&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Config/config.h.cmake (original)
+++ llvm/trunk/include/llvm/Config/config.h.cmake Sun Mar 6 18:13:09 2016
@@ -555,9 +555,6 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
-/* Type of 1st arg on ELM Callback */
-#cmakedefine WIN32_ELMCB_PCSTR ${WIN32_ELMCB_PCSTR}
-
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
Modified: llvm/trunk/lib/Support/Windows/DynamicLibrary.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/DynamicLibrary.inc?rev=262810&r1=262809&r2=262810&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/DynamicLibrary.inc (original)
+++ llvm/trunk/lib/Support/Windows/DynamicLibrary.inc Sun Mar 6 18:13:09 2016
@@ -45,7 +45,7 @@ static bool loadDebugHelp(void) {
}
static BOOL CALLBACK
-ELM_Callback(WIN32_ELMCB_PCSTR ModuleName, DWORD64 ModuleBase,
+ELM_Callback(PCSTR ModuleName, DWORD64 ModuleBase,
ULONG ModuleSize, PVOID UserContext) {
OpenedHandles->insert((HMODULE)ModuleBase);
return TRUE;
Modified: llvm/trunk/lib/Support/Windows/Signals.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Signals.inc?rev=262810&r1=262809&r2=262810&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/Signals.inc (original)
+++ llvm/trunk/lib/Support/Windows/Signals.inc Sun Mar 6 18:13:09 2016
@@ -241,7 +241,7 @@ struct FindModuleData {
};
}
-static BOOL CALLBACK findModuleCallback(WIN32_ELMCB_PCSTR ModuleName,
+static BOOL CALLBACK findModuleCallback(PCSTR ModuleName,
DWORD64 ModuleBase, ULONG ModuleSize,
void *VoidData) {
FindModuleData *Data = (FindModuleData*)VoidData;
More information about the llvm-commits
mailing list