Make the destructor of ConstraintManager virtual.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55448 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Analysis/PathSensitive/ConstraintManager.h b/include/clang/Analysis/PathSensitive/ConstraintManager.h
index 0d8b56a..39e5918 100644
--- a/include/clang/Analysis/PathSensitive/ConstraintManager.h
+++ b/include/clang/Analysis/PathSensitive/ConstraintManager.h
@@ -9,6 +9,7 @@
class ConstraintManager {
public:
+ virtual ~ConstraintManager();
virtual const GRState* Assume(const GRState* St, RVal Cond, bool Assumption,
bool& isFeasible) = 0;
};
diff --git a/lib/Analysis/GRState.cpp b/lib/Analysis/GRState.cpp
index 4ad0a44..8ea1191 100644
--- a/lib/Analysis/GRState.cpp
+++ b/lib/Analysis/GRState.cpp
@@ -13,11 +13,15 @@
#include "clang/Analysis/PathSensitive/GRStateTrait.h"
#include "clang/Analysis/PathSensitive/GRState.h"
-#include "llvm/ADT/SmallSet.h"
#include "clang/Analysis/PathSensitive/GRTransferFuncs.h"
+#include "llvm/ADT/SmallSet.h"
#include "llvm/Support/raw_ostream.h"
+
using namespace clang;
+// Give the vtable for ConstraintManager somewhere to live.
+ConstraintManager::~ConstraintManager() {}
+
GRStateManager::~GRStateManager() {
for (std::vector<GRState::Printer*>::iterator I=Printers.begin(),
E=Printers.end(); I!=E; ++I)