COM.h 1.1 KB

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