diff options
| author | Reid Kleckner <rnk@google.com> | 2018-07-19 20:32:45 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2018-07-19 20:32:45 +0000 |
| commit | 056904599b7367835643a404809e884a102c7a90 (patch) | |
| tree | a6481d459bdcdd5ddd8e35e467ef34bc6ccefe2c | |
| parent | 690b544f41d292b105931600d5ffe71ce13d5289 (diff) | |
| download | bcm5719-llvm-056904599b7367835643a404809e884a102c7a90.tar.gz bcm5719-llvm-056904599b7367835643a404809e884a102c7a90.zip | |
Work around bug in mingw-w64 GCC 8.1.0
This particular version of GCC seems to break bitfields when a method
appears between two bitfield members.
Personally, I think it's nice to keep bitfields close together so that
it's easy to check how things are packed, so I moved the method after
SubClassData.
Fixes PR38168.
llvm-svn: 337495
| -rw-r--r-- | llvm/include/llvm/IR/GlobalValue.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/include/llvm/IR/GlobalValue.h b/llvm/include/llvm/IR/GlobalValue.h index 3e42bd60a6d..9d9f4f65a6b 100644 --- a/llvm/include/llvm/IR/GlobalValue.h +++ b/llvm/include/llvm/IR/GlobalValue.h @@ -110,18 +110,12 @@ protected: unsigned IsDSOLocal : 1; private: - friend class Constant; - - void maybeSetDsoLocal() { - if (hasLocalLinkage() || - (!hasDefaultVisibility() && !hasExternalWeakLinkage())) - setDSOLocal(true); - } - // Give subclasses access to what otherwise would be wasted padding. // (17 + 4 + 2 + 2 + 2 + 3 + 1 + 1) == 32. unsigned SubClassData : GlobalValueSubClassDataBits; + friend class Constant; + void destroyConstantImpl(); Value *handleOperandChangeImpl(Value *From, Value *To); @@ -149,6 +143,12 @@ private: llvm_unreachable("Fully covered switch above!"); } + void maybeSetDsoLocal() { + if (hasLocalLinkage() || + (!hasDefaultVisibility() && !hasExternalWeakLinkage())) + setDSOLocal(true); + } + protected: /// The intrinsic ID for this subclass (which must be a Function). /// |

