diff options
author | Xiretza <xiretza@xiretza.xyz> | 2020-05-04 21:12:30 +0200 |
---|---|---|
committer | Xiretza <xiretza@xiretza.xyz> | 2020-05-07 13:39:34 +0200 |
commit | 695150b0378528233837348b598033b137b8a949 (patch) | |
tree | df1720c84ac61299984dde8a0c0ac3bf52c99924 /backends/cxxrtl/cxxrtl.cc | |
parent | a299e606f864942c7edf90c4ad3998f4f4a346cf (diff) | |
download | yosys-695150b0378528233837348b598033b137b8a949.tar.gz yosys-695150b0378528233837348b598033b137b8a949.tar.bz2 yosys-695150b0378528233837348b598033b137b8a949.zip |
Add YS_FALLTHROUGH macro to mark case fall-through
C++17 introduced [[fallthrough]], GCC and clang had their own vendored
attributes before that. MSVC doesn't seem to have such a warning at all.
Diffstat (limited to 'backends/cxxrtl/cxxrtl.cc')
-rw-r--r-- | backends/cxxrtl/cxxrtl.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/backends/cxxrtl/cxxrtl.cc b/backends/cxxrtl/cxxrtl.cc index e7711962f..133f56663 100644 --- a/backends/cxxrtl/cxxrtl.cc +++ b/backends/cxxrtl/cxxrtl.cc @@ -2346,16 +2346,22 @@ struct CxxrtlBackend : public Backend { case 6: worker.max_opt_level = true; worker.run_proc_flatten = true; + YS_FALLTHROUGH case 5: worker.run_opt_clean_purge = true; + YS_FALLTHROUGH case 4: worker.localize_public = true; + YS_FALLTHROUGH case 3: worker.elide_public = true; + YS_FALLTHROUGH case 2: worker.localize_internal = true; + YS_FALLTHROUGH case 1: worker.elide_internal = true; + YS_FALLTHROUGH case 0: break; default: |