It seems small bitfield confuses valgrind.
This patch makes a bitfiled to (valgrind-recognizable) i8 size.
I am using;
valgrind-3.6.0 x86-64
It caused bunch of failures in clang/test/Modules with --vg.
http://llvm-reviews.chandlerc.com/D218
Files:
llvm/include/llvm/ADT/Optional.h
Index: llvm/include/llvm/ADT/Optional.h
===================================================================
--- llvm/include/llvm/ADT/Optional.h
+++ llvm/include/llvm/ADT/Optional.h
@@ -28,7 +28,7 @@
template<typename T>
class Optional {
T x;
- unsigned hasVal : 1;
+ unsigned char hasVal;
public:
explicit Optional() : x(), hasVal(false) {}
Optional(const T &y) : x(y), hasVal(true) {}
Index: llvm/include/llvm/ADT/Optional.h
===================================================================
--- llvm/include/llvm/ADT/Optional.h
+++ llvm/include/llvm/ADT/Optional.h
@@ -28,7 +28,7 @@
template<typename T>
class Optional {
T x;
- unsigned hasVal : 1;
+ unsigned char hasVal;
public:
explicit Optional() : x(), hasVal(false) {}
Optional(const T &y) : x(y), hasVal(true) {}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits