mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-07 11:51:13 +00:00
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
49cbcf460d
commit
f2a855cbd7
@ -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
Block a user