[PATCH] D113040: [lld-macho] Change bitfield types to be identical.

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 2 12:16:12 PDT 2021


oontvoo created this revision.
oontvoo added a reviewer: int3.
Herald added a reviewer: gkm.
Herald added a project: lld-macho.
Herald added a reviewer: lld-macho.
oontvoo requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Symbol's subclasses all have an additional bitfield of type uint8_t (RefState enum).
For the bitfields in the same block tomerge, they should be of the same type. (clang/gcc will work, but others like MSVC does not)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113040

Files:
  lld/MachO/Symbols.h


Index: lld/MachO/Symbols.h
===================================================================
--- lld/MachO/Symbols.h
+++ lld/MachO/Symbols.h
@@ -104,10 +104,10 @@
 
 public:
   // True if this symbol was referenced by a regular (non-bitcode) object.
-  bool isUsedInRegularObj : 1;
+  uint8_t isUsedInRegularObj : 1;
 
   // True if an undefined or dylib symbol is used from a live section.
-  bool used : 1;
+  uint8_t used : 1;
 };
 
 class Defined : public Symbol {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113040.384182.patch
Type: text/x-patch
Size: 471 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211102/b3d8bc9a/attachment.bin>


More information about the llvm-commits mailing list