Linker.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*===-- llvm-c/Linker.h - Module Linker C Interface -------------*- 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 defines the C interface to the module/file/archive linker. *|
  11. |* *|
  12. \*===----------------------------------------------------------------------===*/
  13. #ifndef LLVM_C_LINKER_H
  14. #define LLVM_C_LINKER_H
  15. #include "llvm-c/Core.h"
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /* This enum is provided for backwards-compatibility only. It has no effect. */
  20. typedef enum {
  21. LLVMLinkerDestroySource = 0, /* This is the default behavior. */
  22. LLVMLinkerPreserveSource_Removed = 1 /* This option has been deprecated and
  23. should not be used. */
  24. } LLVMLinkerMode;
  25. /* Links the source module into the destination module, taking ownership
  26. * of the source module away from the caller. Optionally returns a
  27. * human-readable description of any errors that occurred in linking.
  28. * OutMessage must be disposed with LLVMDisposeMessage. The return value
  29. * is true if an error occurred, false otherwise.
  30. *
  31. * Note that the linker mode parameter \p Unused is no longer used, and has
  32. * no effect. */
  33. LLVMBool LLVMLinkModules(LLVMModuleRef Dest, LLVMModuleRef Src,
  34. LLVMLinkerMode Unused, _Outptr_result_maybenull_ char **OutMessage);
  35. #ifdef __cplusplus
  36. }
  37. #endif
  38. #endif