LLVM
3.7.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
work
release_test
rc4
llvm.src
lib
Support
Windows
Windows/COM.inc
Go to the documentation of this file.
1
//===- llvm/Support/Windows/COM.inc - Windows COM Implementation *- C++ -*-===//
2
//
3
// The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// This file implements the Windows portion of COM support.
11
//
12
//===----------------------------------------------------------------------===//
13
14
//===----------------------------------------------------------------------===//
15
//=== WARNING: Implementation here must contain only Windows code.
16
//===----------------------------------------------------------------------===//
17
18
#include <objbase.h>
19
20
namespace
llvm {
21
namespace
sys {
22
23
InitializeCOMRAII::InitializeCOMRAII
(
COMThreadingMode
Threading
,
24
bool
SpeedOverMemory) {
25
DWORD Coinit = 0;
26
if
(Threading ==
COMThreadingMode::SingleThreaded
)
27
Coinit |= COINIT_APARTMENTTHREADED;
28
else
29
Coinit |= COINIT_MULTITHREADED;
30
if
(SpeedOverMemory)
31
Coinit |= COINIT_SPEED_OVER_MEMORY;
32
::CoInitializeEx(
nullptr
, Coinit);
33
}
34
35
InitializeCOMRAII::~InitializeCOMRAII
() { ::CoUninitialize(); }
36
}
37
}
llvm::sys::InitializeCOMRAII::InitializeCOMRAII
InitializeCOMRAII(COMThreadingMode Threading, bool SpeedOverMemory=false)
llvm::sys::InitializeCOMRAII::~InitializeCOMRAII
~InitializeCOMRAII()
llvm::sys::COMThreadingMode
COMThreadingMode
Definition:
COM.h:21
Threading
jump Jump Threading
Definition:
JumpThreading.cpp:148
llvm::sys::COMThreadingMode::SingleThreaded
Generated on Mon Aug 31 2015 10:59:45 for LLVM by
1.8.6