mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 10:58:11 +08:00
[flang][NFC] fix build warning about unused argument (#164776)
Fix warning about unused arguments. Just use [[maybe_unsued]] to deal with the fact that these arguments are not always used because of the `if constexpr`.
This commit is contained in:
@@ -816,8 +816,9 @@ static void genDeclareDataOperandOperations(
|
||||
Fortran::semantics::FindCommonBlockContaining(symbol)) {
|
||||
emitCommonGlobal(
|
||||
converter, builder, accObject, dataClause,
|
||||
[&](mlir::OpBuilder &modBuilder, mlir::Location loc,
|
||||
fir::GlobalOp globalOp, mlir::acc::DataClause clause,
|
||||
[&](mlir::OpBuilder &modBuilder, [[maybe_unused]] mlir::Location loc,
|
||||
[[maybe_unused]] fir::GlobalOp globalOp,
|
||||
[[maybe_unused]] mlir::acc::DataClause clause,
|
||||
std::stringstream &asFortranStr, const std::string &ctorName) {
|
||||
if constexpr (std::is_same_v<EntryOp, mlir::acc::DeclareLinkOp>) {
|
||||
createDeclareGlobalOp<
|
||||
|
||||
Reference in New Issue
Block a user