[llvm] [NFC] Add SHF_NONE to fix Werror=extra warning (PR #112808)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 01:19:24 PDT 2024


================
@@ -1180,6 +1180,9 @@ enum : unsigned {
 
 // Section flags.
 enum : unsigned {
+  // No flag
+  SHF_NONE = 0x0,
----------------
jh7370 wrote:

Strong +1 to this. `SHF_NONE` isn't a standard value, so we shouldn't list it here.

Furthermore, these are bitwise flags, having a definition for a flag with value 0 makes no sense, since something like `SHF_NONE | SHF_WRITE` would be meaningless.

https://github.com/llvm/llvm-project/pull/112808


More information about the llvm-commits mailing list