[flang-commits] [flang] 9263e08 - [flang] ifdef to avoid warning about supposedly dead function

Eric Schweitz via flang-commits flang-commits at lists.llvm.org
Thu Jul 9 16:10:21 PDT 2020


Author: Eric Schweitz
Date: 2020-07-09T16:10:08-07:00
New Revision: 9263e08251ae7ab6feaa6cda37d70fbd6971cfc4

URL: https://github.com/llvm/llvm-project/commit/9263e08251ae7ab6feaa6cda37d70fbd6971cfc4
DIFF: https://github.com/llvm/llvm-project/commit/9263e08251ae7ab6feaa6cda37d70fbd6971cfc4.diff

LOG: [flang] ifdef to avoid warning about supposedly dead function

Added: 
    

Modified: 
    flang/lib/Optimizer/Dialect/FIRType.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Optimizer/Dialect/FIRType.cpp b/flang/lib/Optimizer/Dialect/FIRType.cpp
index edf8a4d28904..c29412b86944 100644
--- a/flang/lib/Optimizer/Dialect/FIRType.cpp
+++ b/flang/lib/Optimizer/Dialect/FIRType.cpp
@@ -295,11 +295,13 @@ RecordType parseDerived(mlir::DialectAsmParser &parser, mlir::Location) {
   return verifyDerived(parser, result, lenParamList, typeList);
 }
 
+#ifndef NDEBUG
 // !fir.ptr<X> and !fir.heap<X> where X is !fir.ptr, !fir.heap, or !fir.ref
 // is undefined and disallowed.
 inline bool singleIndirectionLevel(mlir::Type ty) {
   return !fir::isa_ref_type(ty);
 }
+#endif
 
 } // namespace
 


        


More information about the flang-commits mailing list