[flang] Recode a switch() to dodge a sketchy warning
authorpeter klausler <pklausler@nvidia.com>
Fri, 18 Jun 2021 23:55:37 +0000 (16:55 -0700)
committerpeter klausler <pklausler@nvidia.com>
Fri, 18 Jun 2021 23:58:44 +0000 (16:58 -0700)
commitb3c1f53c989f6aefad581955e3add222cfb5d890
tree8fa1a690eb997c8ef2795dbeac09d3471355e012
parent5540470f642a3118439996cbcde7d90530588eb5
[flang] Recode a switch() to dodge a sketchy warning

One of the buildbots uses a compiler (can't tell which) that
doesn't approve of a "default:" in a switch statement whose
cases appear to completely cover all possible values of an
enum class.  But this switch is in raw data dumping code that
needs to allow for incorrect values in memory.  So rewrite it
as a cascade of if statements; performance doesn't matter here.
flang/runtime/type-info.cpp