mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
Fix residual Visual Studio build problems
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18688 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b6a0d3595b
commit
31127e1d89
@ -66,6 +66,7 @@ typedef u_int64_t uint64_t;
|
||||
#else /* _MSC_VER */
|
||||
// Visual C++ doesn't provide standard integer headers, but it does provide
|
||||
// built-in data types.
|
||||
#include <stddef.h>
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
typedef signed int int32_t;
|
||||
|
@ -12,7 +12,6 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "Win32.h"
|
||||
#include <windef.h>
|
||||
|
||||
namespace llvm {
|
||||
using namespace sys;
|
||||
@ -23,33 +22,30 @@ using namespace sys;
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
DynamicLibrary::DynamicLibrary() : handle(0) {
|
||||
handle = new HMODULE;
|
||||
*((HMODULE*)handle) = GetModuleHandle(NULL);
|
||||
handle = (void*) GetModuleHandle(NULL);
|
||||
|
||||
if (*((HMODULE*)handle) == 0) {
|
||||
if (handle == 0) {
|
||||
ThrowError("Can't GetModuleHandle: ");
|
||||
}
|
||||
}
|
||||
|
||||
DynamicLibrary::DynamicLibrary(const char*filename) : handle(0) {
|
||||
handle = new HMODULE;
|
||||
*((HMODULE*)handle) = LoadLibrary(filename);
|
||||
handle = LoadLibrary(filename);
|
||||
|
||||
if (*((HMODULE*)handle) == 0) {
|
||||
if (handle == 0) {
|
||||
ThrowError("Can't LoadLibrary: ");
|
||||
}
|
||||
}
|
||||
|
||||
DynamicLibrary::~DynamicLibrary() {
|
||||
assert(handle !=0 && "Invalid DynamicLibrary handle");
|
||||
if (*((HMODULE*)handle))
|
||||
FreeLibrary(*((HMODULE*)handle));
|
||||
delete (HMODULE*)handle;
|
||||
if (handle)
|
||||
FreeLibrary((HMODULE*)handle);
|
||||
}
|
||||
|
||||
void *DynamicLibrary::GetAddressOfSymbol(const char *symbolName) {
|
||||
assert(handle !=0 && "Invalid DynamicLibrary handle");
|
||||
return (void*) GetProcAddress(*((HMODULE*)handle), symbolName);
|
||||
return (void*) GetProcAddress((HMODULE*)handle, symbolName);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -12,7 +12,6 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "Win32.h"
|
||||
#include <windef.h>
|
||||
|
||||
namespace llvm {
|
||||
using namespace sys;
|
||||
@ -23,33 +22,30 @@ using namespace sys;
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
DynamicLibrary::DynamicLibrary() : handle(0) {
|
||||
handle = new HMODULE;
|
||||
*((HMODULE*)handle) = GetModuleHandle(NULL);
|
||||
handle = (void*) GetModuleHandle(NULL);
|
||||
|
||||
if (*((HMODULE*)handle) == 0) {
|
||||
if (handle == 0) {
|
||||
ThrowError("Can't GetModuleHandle: ");
|
||||
}
|
||||
}
|
||||
|
||||
DynamicLibrary::DynamicLibrary(const char*filename) : handle(0) {
|
||||
handle = new HMODULE;
|
||||
*((HMODULE*)handle) = LoadLibrary(filename);
|
||||
handle = LoadLibrary(filename);
|
||||
|
||||
if (*((HMODULE*)handle) == 0) {
|
||||
if (handle == 0) {
|
||||
ThrowError("Can't LoadLibrary: ");
|
||||
}
|
||||
}
|
||||
|
||||
DynamicLibrary::~DynamicLibrary() {
|
||||
assert(handle !=0 && "Invalid DynamicLibrary handle");
|
||||
if (*((HMODULE*)handle))
|
||||
FreeLibrary(*((HMODULE*)handle));
|
||||
delete (HMODULE*)handle;
|
||||
if (handle)
|
||||
FreeLibrary((HMODULE*)handle);
|
||||
}
|
||||
|
||||
void *DynamicLibrary::GetAddressOfSymbol(const char *symbolName) {
|
||||
assert(handle !=0 && "Invalid DynamicLibrary handle");
|
||||
return (void*) GetProcAddress(*((HMODULE*)handle), symbolName);
|
||||
return (void*) GetProcAddress((HMODULE*)handle, symbolName);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -310,9 +310,6 @@
|
||||
<File
|
||||
RelativePath="..\..\lib\Transforms\Scalar\SimplifyCFG.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\lib\Transforms\Scalar\SymbolStripping.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\lib\Transforms\Scalar\TailDuplication.cpp">
|
||||
</File>
|
||||
|
Loading…
Reference in New Issue
Block a user