diff --git a/flang/lib/Optimizer/CodeGen/CodeGen.cpp b/flang/lib/Optimizer/CodeGen/CodeGen.cpp index 04e40cc759315..a05f019471dfe 100644 --- a/flang/lib/Optimizer/CodeGen/CodeGen.cpp +++ b/flang/lib/Optimizer/CodeGen/CodeGen.cpp @@ -2892,6 +2892,7 @@ struct HasValueOpConversion : public FIROpConversion { } }; +#ifndef NDEBUG // Check if attr's type is compatible with ty. // // This is done by comparing attr's element type, converted to LLVM type, @@ -2927,6 +2928,7 @@ static inline bool attributeTypeIsCompatible(mlir::MLIRContext *ctx, return attrEleTy == eleTy; } +#endif /// Lower `fir.global` operation to `llvm.global` operation. /// `fir.insert_on_range` operations are replaced with constant dense attribute