Skip to content
Commit 0c1f598c authored by George Rimar's avatar George Rimar
Browse files

[Support/Compiler.h] - Use gnu::fallthrough for LLVM_FALLTHROUGH when available.

I tried to compile LLD using GCC 7.1.0 and got warnings like 
"warning: this statement may fall through [-Wimplicit-fallthrough=]"
(some more details are here: D32907)

GCC's __cplusplus value is 201402L by default, so macro expands to nothing,
though GCC 7 has support for [[fallthrough]].

Patch uses gnu::fallthrough when it is available and fixes warning I am observing.

Initial idea of way to fix belongs to Davide Italiano.

Differential revision: https://reviews.llvm.org/D33036

llvm-svn: 302878
parent d1ec7385
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment