LLVM 22.0.0git
Collaboration diagram for Comdats:

Enumerations

enum  LLVMComdatSelectionKind {
  LLVMAnyComdatSelectionKind , LLVMExactMatchComdatSelectionKind , LLVMLargestComdatSelectionKind , LLVMNoDeduplicateComdatSelectionKind ,
  LLVMSameSizeComdatSelectionKind
}

Functions

LLVM_C_ABI LLVMComdatRef LLVMGetOrInsertComdat (LLVMModuleRef M, const char *Name)
 Return the Comdat in the module with the specified name.
LLVM_C_ABI LLVMComdatRef LLVMGetComdat (LLVMValueRef V)
 Get the Comdat assigned to the given global object.
LLVM_C_ABI void LLVMSetComdat (LLVMValueRef V, LLVMComdatRef C)
 Assign the Comdat to the given global object.
LLVM_C_ABI LLVMComdatSelectionKind LLVMGetComdatSelectionKind (LLVMComdatRef C)
LLVM_C_ABI void LLVMSetComdatSelectionKind (LLVMComdatRef C, LLVMComdatSelectionKind Kind)

Detailed Description

Enumeration Type Documentation

◆ LLVMComdatSelectionKind

Enumerator
LLVMAnyComdatSelectionKind 

The linker may choose any COMDAT.

LLVMExactMatchComdatSelectionKind 

The data referenced by the COMDAT must be the same.

LLVMLargestComdatSelectionKind 

The linker will choose the largest COMDAT.

LLVMNoDeduplicateComdatSelectionKind 

No deduplication is performed.

LLVMSameSizeComdatSelectionKind 

The data referenced by the COMDAT must be the same size.

Definition at line 30 of file Comdat.h.

Function Documentation

◆ LLVMGetComdat()

Get the Comdat assigned to the given global object.

See also
llvm::GlobalObject::getComdat()

Definition at line 38 of file Comdat.cpp.

References G, llvm::unwrap(), and llvm::wrap().

◆ LLVMGetComdatSelectionKind()

◆ LLVMGetOrInsertComdat()

LLVM_C_ABI LLVMComdatRef LLVMGetOrInsertComdat ( LLVMModuleRef M,
const char * Name )

Return the Comdat in the module with the specified name.

It is created if it didn't already exist.

See also
llvm::Module::getOrInsertComdat()

Definition at line 34 of file Comdat.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMSetComdat()

LLVM_C_ABI void LLVMSetComdat ( LLVMValueRef V,
LLVMComdatRef C )

Assign the Comdat to the given global object.

See also
llvm::GlobalObject::setComdat()

Definition at line 43 of file Comdat.cpp.

References llvm::CallingConv::C, G, and llvm::unwrap().

◆ LLVMSetComdatSelectionKind()