Skip to content

Commit

Permalink
Revert r130657, "Windows/DynamicLibrary.inc: Clean up ELM_Callback. W…
Browse files Browse the repository at this point in the history
…e 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262810 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
chapuni committed Mar 7, 2016
1 parent 0c5336e commit dbdf410
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 20 deletions.
15 changes: 0 additions & 15 deletions cmake/config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 0 additions & 3 deletions include/llvm/Config/config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/Support/Windows/DynamicLibrary.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/Support/Windows/Signals.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dbdf410

Please sign in to comment.