[Alignment][NFC] Use Align with TargetLowering::setMinFunctionAlignment
[llvm-core.git] / include / llvm-c / Comdat.h
blob81fee3fc9a6b4018a60fb1e95962a15b0b721c13
1 /*===-- llvm-c/Comdat.h - Module Comdat C Interface -------------*- C++ -*-===*\
2 |* *|
3 |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
4 |* Exceptions. *|
5 |* See https://llvm.org/LICENSE.txt for license information. *|
6 |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
7 |* *|
8 |*===----------------------------------------------------------------------===*|
9 |* *|
10 |* This file defines the C interface to COMDAT. *|
11 |* *|
12 \*===----------------------------------------------------------------------===*/
14 #ifndef LLVM_C_COMDAT_H
15 #define LLVM_C_COMDAT_H
17 #include "llvm-c/Types.h"
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
23 typedef enum {
24 LLVMAnyComdatSelectionKind, ///< The linker may choose any COMDAT.
25 LLVMExactMatchComdatSelectionKind, ///< The data referenced by the COMDAT must
26 ///< be the same.
27 LLVMLargestComdatSelectionKind, ///< The linker will choose the largest
28 ///< COMDAT.
29 LLVMNoDuplicatesComdatSelectionKind, ///< No other Module may specify this
30 ///< COMDAT.
31 LLVMSameSizeComdatSelectionKind ///< The data referenced by the COMDAT must be
32 ///< the same size.
33 } LLVMComdatSelectionKind;
35 /**
36 * Return the Comdat in the module with the specified name. It is created
37 * if it didn't already exist.
39 * @see llvm::Module::getOrInsertComdat()
41 LLVMComdatRef LLVMGetOrInsertComdat(LLVMModuleRef M, const char *Name);
43 /**
44 * Get the Comdat assigned to the given global object.
46 * @see llvm::GlobalObject::getComdat()
48 LLVMComdatRef LLVMGetComdat(LLVMValueRef V);
50 /**
51 * Assign the Comdat to the given global object.
53 * @see llvm::GlobalObject::setComdat()
55 void LLVMSetComdat(LLVMValueRef V, LLVMComdatRef C);
58 * Get the conflict resolution selection kind for the Comdat.
60 * @see llvm::Comdat::getSelectionKind()
62 LLVMComdatSelectionKind LLVMGetComdatSelectionKind(LLVMComdatRef C);
65 * Set the conflict resolution selection kind for the Comdat.
67 * @see llvm::Comdat::setSelectionKind()
69 void LLVMSetComdatSelectionKind(LLVMComdatRef C, LLVMComdatSelectionKind Kind);
71 #ifdef __cplusplus
73 #endif
75 #endif