LLVM  8.0.0svn
Comdat.h
Go to the documentation of this file.
1 /*===-- llvm-c/Comdat.h - Module Comdat 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 COMDAT. *|
11 |* *|
12 \*===----------------------------------------------------------------------===*/
13 
14 #ifndef LLVM_C_COMDAT_H
15 #define LLVM_C_COMDAT_H
16 
17 #include "llvm-c/Types.h"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
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.
34 
35 /**
36  * Return the Comdat in the module with the specified name. It is created
37  * if it didn't already exist.
38  *
39  * @see llvm::Module::getOrInsertComdat()
40  */
42 
43 /**
44  * Get the Comdat assigned to the given global object.
45  *
46  * @see llvm::GlobalObject::getComdat()
47  */
49 
50 /**
51  * Assign the Comdat to the given global object.
52  *
53  * @see llvm::GlobalObject::setComdat()
54  */
56 
57 /*
58  * Get the conflict resolution selection kind for the Comdat.
59  *
60  * @see llvm::Comdat::getSelectionKind()
61  */
62 LLVMComdatSelectionKind LLVMGetComdatSelectionKind(LLVMComdatRef C);
63 
64 /*
65  * Set the conflict resolution selection kind for the Comdat.
66  *
67  * @see llvm::Comdat::setSelectionKind()
68  */
69 void LLVMSetComdatSelectionKind(LLVMComdatRef C, LLVMComdatSelectionKind Kind);
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 
75 #endif
uint64_t CallInst * C
struct LLVMOpaqueModule * LLVMModuleRef
The top-level container for all other LLVM Intermediate Representation (IR) objects.
Definition: Types.h:62
LLVMComdatSelectionKind
Definition: Comdat.h:23
The data referenced by the COMDAT must be the same size.
Definition: Comdat.h:31
struct LLVMComdat * LLVMComdatRef
Definition: Types.h:140
LLVMComdatRef LLVMGetComdat(LLVMValueRef V)
Get the Comdat assigned to the given global object.
Definition: Comdat.cpp:33
The linker may choose any COMDAT.
Definition: Comdat.h:24
The data referenced by the COMDAT must be the same.
Definition: Comdat.h:25
void LLVMSetComdatSelectionKind(LLVMComdatRef C, LLVMComdatSelectionKind Kind)
Definition: Comdat.cpp:59
LLVMComdatSelectionKind LLVMGetComdatSelectionKind(LLVMComdatRef C)
Definition: Comdat.cpp:43
The linker will choose the largest COMDAT.
Definition: Comdat.h:27
No other Module may specify this COMDAT.
Definition: Comdat.h:29
LLVMComdatRef LLVMGetOrInsertComdat(LLVMModuleRef M, const char *Name)
Return the Comdat in the module with the specified name.
Definition: Comdat.cpp:29
void LLVMSetComdat(LLVMValueRef V, LLVMComdatRef C)
Assign the Comdat to the given global object.
Definition: Comdat.cpp:38
const unsigned Kind
struct LLVMOpaqueValue * LLVMValueRef
Represents an individual value in LLVM IR.
Definition: Types.h:76