LLVM: lib/IR/Comdat.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
21
22using namespace llvm;
23
25
27
29
31
33
35 return wrap(unwrap(M)->getOrInsertComdat(Name));
36}
37
40 return wrap(G->getComdat());
41}
42
47
49 switch (unwrap(C)->getSelectionKind()) {
60 }
62}
63
66 switch (kind) {
69 break;
72 break;
75 break;
78 break;
81 break;
82 }
83}
This file defines the StringMapEntry class - it is intended to be a low dependency implementation det...
Module.h This file contains the declarations for the Module class.
iv Induction Variable Users
This file defines the SmallPtrSet class.
Comdat(const Comdat &)=delete
LLVM_ABI StringRef getName() const
Definition Comdat.cpp:28
@ Largest
The linker will choose the largest COMDAT.
@ SameSize
The data referenced by the COMDAT must be the same size.
@ Any
The linker may choose any COMDAT.
@ NoDeduplicate
No deduplication is performed.
@ ExactMatch
The data referenced by the COMDAT must be the same.
void setSelectionKind(SelectionKind Val)
StringRef - Represent a constant reference to a string, i.e.
LLVM_C_ABI void LLVMSetComdat(LLVMValueRef V, LLVMComdatRef C)
Assign the Comdat to the given global object.
Definition Comdat.cpp:43
LLVM_C_ABI LLVMComdatSelectionKind LLVMGetComdatSelectionKind(LLVMComdatRef C)
Definition Comdat.cpp:48
LLVM_C_ABI void LLVMSetComdatSelectionKind(LLVMComdatRef C, LLVMComdatSelectionKind Kind)
Definition Comdat.cpp:64
LLVM_C_ABI LLVMComdatRef LLVMGetComdat(LLVMValueRef V)
Get the Comdat assigned to the given global object.
Definition Comdat.cpp:38
LLVM_C_ABI LLVMComdatRef LLVMGetOrInsertComdat(LLVMModuleRef M, const char *Name)
Return the Comdat in the module with the specified name.
Definition Comdat.cpp:34
@ LLVMLargestComdatSelectionKind
The linker will choose the largest COMDAT.
@ LLVMSameSizeComdatSelectionKind
The data referenced by the COMDAT must be the same size.
@ LLVMExactMatchComdatSelectionKind
The data referenced by the COMDAT must be the same.
@ LLVMAnyComdatSelectionKind
The linker may choose any COMDAT.
@ LLVMNoDeduplicateComdatSelectionKind
No deduplication is performed.
struct LLVMOpaqueValue * LLVMValueRef
Represents an individual value in LLVM IR.
struct LLVMComdat * LLVMComdatRef
struct LLVMOpaqueModule * LLVMModuleRef
The top-level container for all other LLVM Intermediate Representation (IR) objects.
This file contains the declaration of the Comdat class, which represents a single COMDAT in LLVM.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
Attribute unwrap(LLVMAttributeRef Attr)
LLVMAttributeRef wrap(Attribute Attr)