projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3922757
)
Use a bool instead of a bitfield in llvm/ADT/Optional.
author
Argyrios Kyrtzidis
<akyrtzi@gmail.com>
Wed, 2 Jan 2013 21:19:08 +0000
(21:19 +0000)
committer
Argyrios Kyrtzidis
<akyrtzi@gmail.com>
Wed, 2 Jan 2013 21:19:08 +0000
(21:19 +0000)
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
include/llvm/ADT/Optional.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/Optional.h
b/include/llvm/ADT/Optional.h
index aa43f552d501df15cea382ef82d5a58799254a8f..06e5af073f4061bea2f6c78b7c2b9f0438223278 100644
(file)
--- 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) {}