xref: /freebsd/contrib/llvm-project/llvm/include/llvm/Support/COM.h (revision 700637cbb5e582861067a11aaca4d053546871d2)
1 //===- llvm/Support/COM.h ---------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 /// \file
9 ///
10 /// Provides a library for accessing COM functionality of the Host OS.
11 ///
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_SUPPORT_COM_H
15 #define LLVM_SUPPORT_COM_H
16 
17 #include "llvm/Support/Compiler.h"
18 
19 namespace llvm {
20 namespace sys {
21 
22 enum class COMThreadingMode { SingleThreaded, MultiThreaded };
23 
24 class InitializeCOMRAII {
25 public:
26   LLVM_ABI explicit InitializeCOMRAII(COMThreadingMode Threading,
27                                       bool SpeedOverMemory = false);
28   LLVM_ABI ~InitializeCOMRAII();
29 
30 private:
31   InitializeCOMRAII(const InitializeCOMRAII &) = delete;
32   void operator=(const InitializeCOMRAII &) = delete;
33 };
34 }
35 }
36 
37 #endif
38