[flang-commits] [flang] 367a1fa - [NFC] Mark variable as maybe_unused to silence warning

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Wed Aug 24 05:19:31 PDT 2022


Author: Kiran Chandramohan
Date: 2022-08-24T13:18:28+01:00
New Revision: 367a1fa88992800ee2cc73d3f5a8bc345766cdc8

URL: https://github.com/llvm/llvm-project/commit/367a1fa88992800ee2cc73d3f5a8bc345766cdc8
DIFF: https://github.com/llvm/llvm-project/commit/367a1fa88992800ee2cc73d3f5a8bc345766cdc8.diff

LOG: [NFC] Mark variable as maybe_unused to silence warning

Added: 
    

Modified: 
    flang/lib/Optimizer/CodeGen/CodeGen.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Optimizer/CodeGen/CodeGen.cpp b/flang/lib/Optimizer/CodeGen/CodeGen.cpp
index 335ce24d221d5..00cb71b5af8ce 100644
--- a/flang/lib/Optimizer/CodeGen/CodeGen.cpp
+++ b/flang/lib/Optimizer/CodeGen/CodeGen.cpp
@@ -3043,7 +3043,7 @@ struct IsPresentOpConversion : public FIROpConversion<fir::IsPresentOp> {
     auto ptr = adaptor.getOperands()[0];
 
     if (isPresent.getVal().getType().isa<fir::BoxCharType>()) {
-      auto structTy = ptr.getType().cast<mlir::LLVM::LLVMStructType>();
+      [[maybe_unused]] auto structTy = ptr.getType().cast<mlir::LLVM::LLVMStructType>();
       assert(!structTy.isOpaque() && !structTy.getBody().empty());
 
       ptr = rewriter.create<mlir::LLVM::ExtractValueOp>(loc, ptr, 0);


        


More information about the flang-commits mailing list