[llvm] r277251 - [Support] Add storage specifier for MachO::NListType.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 29 16:17:54 PDT 2016
Author: lhames
Date: Fri Jul 29 18:17:53 2016
New Revision: 277251
URL: http://llvm.org/viewvc/llvm-project?rev=277251&view=rev
Log:
[Support] Add storage specifier for MachO::NListType.
This should fix UB warnings from the sanitizer bots: LLD performs bit
manipulations on enums of this type, and these are UB if the underlying
storage type isn't specified.
Modified:
llvm/trunk/include/llvm/Support/MachO.h
Modified: llvm/trunk/include/llvm/Support/MachO.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/MachO.h?rev=277251&r1=277250&r2=277251&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/MachO.h (original)
+++ llvm/trunk/include/llvm/Support/MachO.h Fri Jul 29 18:17:53 2016
@@ -302,7 +302,7 @@ namespace llvm {
N_EXT = 0x01
};
- enum NListType {
+ enum NListType : uint8_t {
// Constants for the "n_type & N_TYPE" llvm::MachO::nlist and
// llvm::MachO::nlist_64
N_UNDF = 0x0u,
More information about the llvm-commits
mailing list