1//! COMDAT
2use super::*;
34#[repr(C)]
5#[derive(Clone, Copy, Debug, PartialEq)]
6pub enum LLVMComdatSelectionKind {
7/// The linker may choose any COMDAT.
8LLVMAnyComdatSelectionKind,
9/// The data referenced by the COMDAT must be the same.
10LLVMExactMatchComdatSelectionKind,
11/// The linker will choose the largest COMDAT.
12LLVMLargestComdatSelectionKind,
13/// No deduplication is performed.
14LLVMNoDuplicatesComdatSelectionKind,
15/// The data referenced by the COMDAT must be the same size.
16LLVMSameSizeComdatSelectionKind,
17}
1819extern "C" {
20/// Return the Comdat in the module with the specified name. It is created if it didn't already exist.
21pub fn LLVMGetOrInsertComdat(M: LLVMModuleRef, Name: *const ::libc::c_char) -> LLVMComdatRef;
2223/// Get the Comdat assigned to the given global object.
24pub fn LLVMGetComdat(V: LLVMValueRef) -> LLVMComdatRef;
2526/// Assign the Comdat to the given global object.
27pub fn LLVMSetComdat(V: LLVMValueRef, C: LLVMComdatRef);
2829/// Get the conflict resolution selection kind for the Comdat.
30pub fn LLVMGetComdatSelectionKind(C: LLVMComdatRef) -> LLVMComdatSelectionKind;
3132/// Set the conflict resolution selection kind for the Comdat.
33pub fn LLVMSetComdatSelectionKind(C: LLVMComdatRef, Kind: LLVMComdatSelectionKind);
34}