diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-01-02 21:19:08 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-01-02 21:19:08 +0000 |
commit | 23203faf0b36c263248f5b265530c56974d93c98 (patch) | |
tree | fc6754b2e789fe9653dfae57511c86c0f1eb415e /include | |
parent | 39227578242d96bc67e4ee1a408bfc0d83c6aa24 (diff) | |
download | external_llvm-23203faf0b36c263248f5b265530c56974d93c98.zip external_llvm-23203faf0b36c263248f5b265530c56974d93c98.tar.gz external_llvm-23203faf0b36c263248f5b265530c56974d93c98.tar.bz2 |
Use a bool instead of a bitfield in llvm/ADT/Optional.
Fixes Valgrind failures and removes bitwise operations that don't provide any benefit.
Valgrind failures reported by NAKAMURA Takumi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171413 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/Optional.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/Optional.h b/include/llvm/ADT/Optional.h index aa43f55..06e5af0 100644 --- a/include/llvm/ADT/Optional.h +++ b/include/llvm/ADT/Optional.h @@ -28,7 +28,7 @@ namespace llvm { template<typename T> class Optional { T x; - unsigned hasVal : 1; + bool hasVal; public: explicit Optional() : x(), hasVal(false) {} Optional(const T &y) : x(y), hasVal(true) {} |