Linker.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. /*===-- llvm-c/Linker.h - Module Linker C Interface -------------*- C++ -*-===*\
  7. |* *|
  8. |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
  9. |* Exceptions. *|
  10. |* See https://llvm.org/LICENSE.txt for license information. *|
  11. |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
  12. |* *|
  13. |*===----------------------------------------------------------------------===*|
  14. |* *|
  15. |* This file defines the C interface to the module/file/archive linker. *|
  16. |* *|
  17. \*===----------------------------------------------------------------------===*/
  18. #ifndef LLVM_C_LINKER_H
  19. #define LLVM_C_LINKER_H
  20. #include "llvm-c/ExternC.h"
  21. #include "llvm-c/Types.h"
  22. LLVM_C_EXTERN_C_BEGIN
  23. /**
  24. * @defgroup LLVMCCoreLinker Linker
  25. * @ingroup LLVMCCore
  26. *
  27. * @{
  28. */
  29. /* This enum is provided for backwards-compatibility only. It has no effect. */
  30. typedef enum {
  31. LLVMLinkerDestroySource = 0, /* This is the default behavior. */
  32. LLVMLinkerPreserveSource_Removed = 1 /* This option has been deprecated and
  33. should not be used. */
  34. } LLVMLinkerMode;
  35. /* Links the source module into the destination module. The source module is
  36. * destroyed.
  37. * The return value is true if an error occurred, false otherwise.
  38. * Use the diagnostic handler to get any diagnostic message.
  39. */
  40. LLVMBool LLVMLinkModules2(LLVMModuleRef Dest, LLVMModuleRef Src);
  41. LLVM_C_EXTERN_C_END
  42. /**
  43. * @}
  44. */
  45. #endif
  46. #ifdef __GNUC__
  47. #pragma GCC diagnostic pop
  48. #endif