summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-01-02 21:19:08 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-01-02 21:19:08 +0000
commit23203faf0b36c263248f5b265530c56974d93c98 (patch)
treefc6754b2e789fe9653dfae57511c86c0f1eb415e /include
parent39227578242d96bc67e4ee1a408bfc0d83c6aa24 (diff)
downloadllvm-23203faf0b36c263248f5b265530c56974d93c98.tar.gz
llvm-23203faf0b36c263248f5b265530c56974d93c98.tar.bz2
llvm-23203faf0b36c263248f5b265530c56974d93c98.tar.xz
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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/Optional.h b/include/llvm/ADT/Optional.h
index aa43f552d5..06e5af073f 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) {}