[Mlir-commits] [mlir] e764ec6 - [mlir] Fix warnings
Kazu Hirata
llvmlistbot at llvm.org
Wed Sep 20 14:07:02 PDT 2023
Author: Kazu Hirata
Date: 2023-09-20T14:06:55-07:00
New Revision: e764ec62913d784521e8a409c47a83a650fc9096
URL: https://github.com/llvm/llvm-project/commit/e764ec62913d784521e8a409c47a83a650fc9096
DIFF: https://github.com/llvm/llvm-project/commit/e764ec62913d784521e8a409c47a83a650fc9096.diff
LOG: [mlir] Fix warnings
This patch fixes:
mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp:1525:3:
error: default label in switch which covers all enumeration values
[-Werror,-Wcovered-switch-default]
mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp:1541:3:
error: default label in switch which covers all enumeration values
[-Werror,-Wcovered-switch-default]
Added:
Modified:
mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
index 84390576c0523c4..e0c139be0f77f61 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
@@ -1522,10 +1522,8 @@ convertToDeviceClauseKind(mlir::omp::DeclareTargetDeviceType deviceClause) {
case mlir::omp::DeclareTargetDeviceType::any:
return llvm::OffloadEntriesInfoManager::OMPTargetDeviceClauseAny;
break;
- default:
- return llvm::OffloadEntriesInfoManager::OMPTargetDeviceClauseNone;
- break;
}
+ llvm_unreachable("unhandled device clause");
}
static llvm::OffloadEntriesInfoManager::OMPTargetGlobalVarEntryKind
@@ -1538,10 +1536,8 @@ convertToCaptureClauseKind(
case mlir::omp::DeclareTargetCaptureClause::link:
return llvm::OffloadEntriesInfoManager::OMPTargetGlobalVarEntryLink;
break;
- default:
- return llvm::OffloadEntriesInfoManager::OMPTargetGlobalVarEntryNone;
- break;
}
+ llvm_unreachable("unhandled capture clause");
}
static llvm::SmallString<64>
More information about the Mlir-commits
mailing list