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.

llvm-svn: 171413
This commit is contained in:
Argyrios Kyrtzidis 2013-01-02 21:19:08 +00:00
parent 154e6e53ad
commit 1b52f1e364
1 changed files with 1 additions and 1 deletions

View File

@ -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) {}