[flang-commits] [flang] 9263e08 - [flang] ifdef to avoid warning about supposedly dead function
Eric Christopher via flang-commits
flang-commits at lists.llvm.org
Thu Jul 9 16:26:37 PDT 2020
Thanks! The other way of doing this would (especially for this and given
it's only used in asserts) is to inline it since it's small. Your choice
though here :)
-eric
On Thu, Jul 9, 2020 at 4:10 PM Eric Schweitz via flang-commits <
flang-commits at lists.llvm.org> wrote:
>
> 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
>
>
>
>
> _______________________________________________
> flang-commits mailing list
> flang-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20200709/80478cef/attachment-0001.html>
More information about the flang-commits
mailing list