Fix OCaml bindings crash, PR8847.
[oota-llvm.git] / unittests / Support / ValueHandleTest.cpp
index c89a7af6fefef89665aa9a33c741ff82542b7182..2e5e5b167c4105f35d8bd24d56b4a60fec2fcfac 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "llvm/Constants.h"
 #include "llvm/Instructions.h"
+#include "llvm/LLVMContext.h"
 #include "llvm/ADT/OwningPtr.h"
 
 #include "gtest/gtest.h"
@@ -34,7 +35,6 @@ protected:
 
 class ConcreteCallbackVH : public CallbackVH {
 public:
-  ConcreteCallbackVH() : CallbackVH() {}
   ConcreteCallbackVH(Value *V) : CallbackVH(V) {}
 };
 
@@ -108,7 +108,7 @@ TEST_F(ValueHandle, WeakVH_NullOnDeletion) {
 TEST_F(ValueHandle, AssertingVH_BasicOperation) {
   AssertingVH<CastInst> AVH(BitcastV.get());
   CastInst *implicit_to_exact_type = AVH;
-  implicit_to_exact_type = implicit_to_exact_type;  // Avoid warning.
+  (void)implicit_to_exact_type;  // Avoid warning.
 
   AssertingVH<Value> GenericAVH(BitcastV.get());
   EXPECT_EQ(BitcastV.get(), GenericAVH);
@@ -125,7 +125,7 @@ TEST_F(ValueHandle, AssertingVH_Const) {
   const CastInst *ConstBitcast = BitcastV.get();
   AssertingVH<const CastInst> AVH(ConstBitcast);
   const CastInst *implicit_to_exact_type = AVH;
-  implicit_to_exact_type = implicit_to_exact_type;  // Avoid warning.
+  (void)implicit_to_exact_type;  // Avoid warning.
 }
 
 TEST_F(ValueHandle, AssertingVH_Comparisons) {