using namespace mlir::LLVM;
using mlir::LLVM::detail::getLLVMConstant;
-// The include below has a static function unused in this translation unit,
-// declare it as such to silence a warning.
-static LLVM_ATTRIBUTE_UNUSED ::llvm::GlobalValue::LinkageTypes
-convertLinkageToLLVM(::mlir::LLVM::Linkage value);
-
#include "mlir/Dialect/LLVMIR/LLVMConversionEnumsToLLVM.inc"
/// Convert MLIR integer comparison predicate to LLVM IR comparison predicate.
using namespace mlir::LLVM;
using namespace mlir::LLVM::detail;
-// The include below has a static function unused in this translation unit,
-// declare it as such to silence a warning.
-static LLVM_ATTRIBUTE_UNUSED ::llvm::InlineAsm::AsmDialect
-convertAsmDialectToLLVM(::mlir::LLVM::AsmDialect value);
-
#include "mlir/Dialect/LLVMIR/LLVMConversionEnumsToLLVM.inc"
/// Builds a constant of a sequential LLVM type `type`, potentially containing
StringRef cppNamespace = enumAttr.getCppNamespace();
// Emit the function converting the enum attribute to its LLVM counterpart.
- os << formatv("static {0} convert{1}ToLLVM({2}::{1} value) {{\n", llvmClass,
- cppClassName, cppNamespace);
+ os << formatv(
+ "static LLVM_ATTRIBUTE_UNUSED {0} convert{1}ToLLVM({2}::{1} value) {{\n",
+ llvmClass, cppClassName, cppNamespace);
os << " switch (value) {\n";
for (const auto &enumerant : enumAttr.getAllCases()) {
StringRef cppNamespace = enumAttr.getCppNamespace();
// Emit the function converting the enum attribute from its LLVM counterpart.
- os << formatv("inline {0}::{1} convert{1}FromLLVM({2} value) {{\n",
+ os << formatv("inline LLVM_ATTRIBUTE_UNUSED {0}::{1} convert{1}FromLLVM({2} "
+ "value) {{\n",
cppNamespace, cppClassName, llvmClass);
os << " switch (value) {\n";