forked from OSchip/llvm-project
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:
parent
154e6e53ad
commit
1b52f1e364
|
@ -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) {}
|
||||
|
|
Loading…
Reference in New Issue