Skip to content

Commit c3412b0

Browse files
committed
lib update
1 parent e2e31d5 commit c3412b0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

lib/DxcSupport/WinAdapter.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
#include "assert.h"
1111
#include "dxc/Support/WinFunctions.h"
1212
#include "dxc/Support/WinIncludes.h"
13-
#ifndef _WIN32
13+
14+
#ifndef _MSC_VER
1415

1516
#include "dxc/Support/Unicode.h"
1617

@@ -22,6 +23,8 @@ void *CAllocator::Reallocate(void *p, size_t nBytes) throw() {
2223
void *CAllocator::Allocate(size_t nBytes) throw() { return malloc(nBytes); }
2324
void CAllocator::Free(void *p) throw() { free(p); }
2425

26+
#ifndef __MINGW32__
27+
2528
//===--------------------------- BSTR Allocation --------------------------===//
2629

2730
void SysFreeString(BSTR bstrString) {
@@ -61,6 +64,8 @@ unsigned int SysStringLen(const BSTR bstrString) {
6164
return blobIn[0] / sizeof(OLECHAR);
6265
}
6366

67+
#endif // !__MINGW32__
68+
6469
//===--------------------------- CHandle -------------------------------===//
6570

6671
CHandle::CHandle(HANDLE h) { m_h = h; }

lib/IR/PassRegistry.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ using namespace llvm;
3535
// A simple global initialized at DllMain-time will do (still does more work
3636
// than we should likely perform though).
3737
static uint32_t g_PassRegistryTid;
38+
#ifdef _MSC_VER
3839
extern "C" uint32_t __stdcall GetCurrentThreadId(void);
40+
#endif
3941
static void CheckThreadId() {
4042
if (g_PassRegistryTid == 0)
4143
g_PassRegistryTid = GetCurrentThreadId();

0 commit comments

Comments
 (0)