Path: blob/main/contrib/llvm-project/llvm/include/llvm-c/Comdat.h
35233 views
/*===-- llvm-c/Comdat.h - Module Comdat C Interface -------------*- C++ -*-===*\1|* *|2|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|3|* Exceptions. *|4|* See https://llvm.org/LICENSE.txt for license information. *|5|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|6|* *|7|*===----------------------------------------------------------------------===*|8|* *|9|* This file defines the C interface to COMDAT. *|10|* *|11\*===----------------------------------------------------------------------===*/1213#ifndef LLVM_C_COMDAT_H14#define LLVM_C_COMDAT_H1516#include "llvm-c/ExternC.h"17#include "llvm-c/Types.h"1819LLVM_C_EXTERN_C_BEGIN2021/**22* @defgroup LLVMCCoreComdat Comdats23* @ingroup LLVMCCore24*25* @{26*/2728typedef enum {29LLVMAnyComdatSelectionKind, ///< The linker may choose any COMDAT.30LLVMExactMatchComdatSelectionKind, ///< The data referenced by the COMDAT must31///< be the same.32LLVMLargestComdatSelectionKind, ///< The linker will choose the largest33///< COMDAT.34LLVMNoDeduplicateComdatSelectionKind, ///< No deduplication is performed.35LLVMSameSizeComdatSelectionKind ///< The data referenced by the COMDAT must be36///< the same size.37} LLVMComdatSelectionKind;3839/**40* Return the Comdat in the module with the specified name. It is created41* if it didn't already exist.42*43* @see llvm::Module::getOrInsertComdat()44*/45LLVMComdatRef LLVMGetOrInsertComdat(LLVMModuleRef M, const char *Name);4647/**48* Get the Comdat assigned to the given global object.49*50* @see llvm::GlobalObject::getComdat()51*/52LLVMComdatRef LLVMGetComdat(LLVMValueRef V);5354/**55* Assign the Comdat to the given global object.56*57* @see llvm::GlobalObject::setComdat()58*/59void LLVMSetComdat(LLVMValueRef V, LLVMComdatRef C);6061/*62* Get the conflict resolution selection kind for the Comdat.63*64* @see llvm::Comdat::getSelectionKind()65*/66LLVMComdatSelectionKind LLVMGetComdatSelectionKind(LLVMComdatRef C);6768/*69* Set the conflict resolution selection kind for the Comdat.70*71* @see llvm::Comdat::setSelectionKind()72*/73void LLVMSetComdatSelectionKind(LLVMComdatRef C, LLVMComdatSelectionKind Kind);7475/**76* @}77*/7879LLVM_C_EXTERN_C_END8081#endif828384