summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2011-12-20 02:50:00 +0000
committerDavid Blaikie <dblaikie@gmail.com>2011-12-20 02:50:00 +0000
commit2d24e2a396a1d211baaeedf32148a3b657240170 (patch)
tree756132115ff4a5abb85dfbd38cef66e0d36efcb1 /include
parent1885687462c5fc6094f56d8d5f3ce0a71ae157e4 (diff)
downloadllvm-2d24e2a396a1d211baaeedf32148a3b657240170.tar.gz
llvm-2d24e2a396a1d211baaeedf32148a3b657240170.tar.bz2
llvm-2d24e2a396a1d211baaeedf32148a3b657240170.tar.xz
Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146960 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/IntrusiveRefCntPtr.h1
-rw-r--r--include/llvm/Analysis/DebugInfo.h13
-rw-r--r--include/llvm/Analysis/DominanceFrontier.h1
-rw-r--r--include/llvm/Argument.h1
-rw-r--r--include/llvm/CodeGen/JITCodeEmitter.h1
-rw-r--r--include/llvm/CodeGen/LexicalScopes.h1
-rw-r--r--include/llvm/CodeGen/MachineBranchProbabilityInfo.h1
-rw-r--r--include/llvm/CodeGen/MachineCodeEmitter.h3
-rw-r--r--include/llvm/CodeGen/MachineConstantPool.h1
-rw-r--r--include/llvm/CodeGen/MachinePassRegistry.h1
-rw-r--r--include/llvm/CodeGen/ScheduleDAG.h1
-rw-r--r--include/llvm/CodeGen/SelectionDAGISel.h1
-rw-r--r--include/llvm/Constant.h1
-rw-r--r--include/llvm/Constants.h2
-rw-r--r--include/llvm/MC/MCAsmInfoCOFF.h4
-rw-r--r--include/llvm/MC/MCAsmInfoDarwin.h4
-rw-r--r--include/llvm/MC/MCAssembler.h15
-rw-r--r--include/llvm/Metadata.h1
-rw-r--r--include/llvm/Object/Archive.h1
-rw-r--r--include/llvm/Object/ObjectFile.h2
-rw-r--r--include/llvm/TableGen/Record.h6
-rw-r--r--include/llvm/TableGen/TableGenAction.h1
-rw-r--r--include/llvm/TableGen/TableGenBackend.h1
-rw-r--r--include/llvm/Target/TargetJITInfo.h1
-rw-r--r--include/llvm/Target/TargetLibraryInfo.h1
-rw-r--r--include/llvm/Target/TargetRegisterInfo.h1
-rw-r--r--include/llvm/Transforms/Utils/SimplifyIndVar.h1
27 files changed, 63 insertions, 5 deletions
diff --git a/include/llvm/ADT/IntrusiveRefCntPtr.h b/include/llvm/ADT/IntrusiveRefCntPtr.h
index 106daf4179..1d7e463aa1 100644
--- a/include/llvm/ADT/IntrusiveRefCntPtr.h
+++ b/include/llvm/ADT/IntrusiveRefCntPtr.h
@@ -65,6 +65,7 @@ namespace llvm {
//===----------------------------------------------------------------------===//
class RefCountedBaseVPTR {
mutable unsigned ref_cnt;
+ virtual void anchor();
protected:
RefCountedBaseVPTR() : ref_cnt(0) {}
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h
index c4489cfcfe..f62dddd669 100644
--- a/include/llvm/Analysis/DebugInfo.h
+++ b/include/llvm/Analysis/DebugInfo.h
@@ -153,6 +153,7 @@ namespace llvm {
/// DIScope - A base class for various scopes.
class DIScope : public DIDescriptor {
+ virtual void anchor();
public:
explicit DIScope(const MDNode *N = 0) : DIDescriptor (N) {}
virtual ~DIScope() {}
@@ -163,6 +164,7 @@ namespace llvm {
/// DICompileUnit - A wrapper for a compile unit.
class DICompileUnit : public DIScope {
+ virtual void anchor();
public:
explicit DICompileUnit(const MDNode *N = 0) : DIScope(N) {}
@@ -202,6 +204,7 @@ namespace llvm {
/// DIFile - This is a wrapper for a file.
class DIFile : public DIScope {
+ virtual void anchor();
public:
explicit DIFile(const MDNode *N = 0) : DIScope(N) {
if (DbgNode && !isFile())
@@ -230,7 +233,7 @@ namespace llvm {
/// FIXME: Types should be factored much better so that CV qualifiers and
/// others do not require a huge and empty descriptor full of zeros.
class DIType : public DIScope {
- public:
+ virtual void anchor();
protected:
// This ctor is used when the Tag has already been validated by a derived
// ctor.
@@ -240,7 +243,6 @@ namespace llvm {
/// Verify - Verify that a type descriptor is well formed.
bool Verify() const;
- public:
explicit DIType(const MDNode *N);
explicit DIType() {}
virtual ~DIType() {}
@@ -320,6 +322,7 @@ namespace llvm {
/// DIBasicType - A basic type, like 'int' or 'float'.
class DIBasicType : public DIType {
+ virtual void anchor();
public:
explicit DIBasicType(const MDNode *N = 0) : DIType(N) {}
@@ -338,6 +341,7 @@ namespace llvm {
/// DIDerivedType - A simple derived type, like a const qualified type,
/// a typedef, a pointer or reference, etc.
class DIDerivedType : public DIType {
+ virtual void anchor();
protected:
explicit DIDerivedType(const MDNode *N, bool, bool)
: DIType(N, true, true) {}
@@ -391,6 +395,7 @@ namespace llvm {
/// other types, like a function or struct.
/// FIXME: Why is this a DIDerivedType??
class DICompositeType : public DIDerivedType {
+ virtual void anchor();
public:
explicit DICompositeType(const MDNode *N = 0)
: DIDerivedType(N, true, true) {
@@ -454,6 +459,7 @@ namespace llvm {
/// DISubprogram - This is a wrapper for a subprogram (e.g. a function).
class DISubprogram : public DIScope {
+ virtual void anchor();
public:
explicit DISubprogram(const MDNode *N = 0) : DIScope(N) {}
@@ -687,6 +693,7 @@ namespace llvm {
/// DILexicalBlock - This is a wrapper for a lexical block.
class DILexicalBlock : public DIScope {
+ virtual void anchor();
public:
explicit DILexicalBlock(const MDNode *N = 0) : DIScope(N) {}
DIScope getContext() const { return getFieldAs<DIScope>(1); }
@@ -705,6 +712,7 @@ namespace llvm {
/// DILexicalBlockFile - This is a wrapper for a lexical block with
/// a filename change.
class DILexicalBlockFile : public DIScope {
+ virtual void anchor();
public:
explicit DILexicalBlockFile(const MDNode *N = 0) : DIScope(N) {}
DIScope getContext() const { return getScope().getContext(); }
@@ -724,6 +732,7 @@ namespace llvm {
/// DINameSpace - A wrapper for a C++ style name space.
class DINameSpace : public DIScope {
+ virtual void anchor();
public:
explicit DINameSpace(const MDNode *N = 0) : DIScope(N) {}
DIScope getContext() const { return getFieldAs<DIScope>(1); }
diff --git a/include/llvm/Analysis/DominanceFrontier.h b/include/llvm/Analysis/DominanceFrontier.h
index d7f74af1c6..a2e0675e92 100644
--- a/include/llvm/Analysis/DominanceFrontier.h
+++ b/include/llvm/Analysis/DominanceFrontier.h
@@ -154,6 +154,7 @@ public:
/// used to compute a forward dominator frontiers.
///
class DominanceFrontier : public DominanceFrontierBase {
+ virtual void anchor();
public:
static char ID; // Pass ID, replacement for typeid
DominanceFrontier() :
diff --git a/include/llvm/Argument.h b/include/llvm/Argument.h
index cd74882662..e66075c1f2 100644
--- a/include/llvm/Argument.h
+++ b/include/llvm/Argument.h
@@ -30,6 +30,7 @@ template<typename ValueSubClass, typename ItemParentClass>
/// the function was called with.
/// @brief LLVM Argument representation
class Argument : public Value, public ilist_node<Argument> {
+ virtual void anchor();
Function *Parent;
friend class SymbolTableListTraits<Argument, Function>;
diff --git a/include/llvm/CodeGen/JITCodeEmitter.h b/include/llvm/CodeGen/JITCodeEmitter.h
index 88e22d6a24..89f00e91f7 100644
--- a/include/llvm/CodeGen/JITCodeEmitter.h
+++ b/include/llvm/CodeGen/JITCodeEmitter.h
@@ -51,6 +51,7 @@ class Function;
/// occurred, more memory is allocated, and we reemit the code into it.
///
class JITCodeEmitter : public MachineCodeEmitter {
+ virtual void anchor();
public:
virtual ~JITCodeEmitter() {}
diff --git a/include/llvm/CodeGen/LexicalScopes.h b/include/llvm/CodeGen/LexicalScopes.h
index 0271c5d852..6cb5c9e0fb 100644
--- a/include/llvm/CodeGen/LexicalScopes.h
+++ b/include/llvm/CodeGen/LexicalScopes.h
@@ -153,6 +153,7 @@ private:
/// LexicalScope - This class is used to track scope information.
///
class LexicalScope {
+ virtual void anchor();
public:
LexicalScope(LexicalScope *P, const MDNode *D, const MDNode *I, bool A)
diff --git a/include/llvm/CodeGen/MachineBranchProbabilityInfo.h b/include/llvm/CodeGen/MachineBranchProbabilityInfo.h
index e768874894..4a10bc326f 100644
--- a/include/llvm/CodeGen/MachineBranchProbabilityInfo.h
+++ b/include/llvm/CodeGen/MachineBranchProbabilityInfo.h
@@ -25,6 +25,7 @@ class raw_ostream;
class MachineBasicBlock;
class MachineBranchProbabilityInfo : public ImmutablePass {
+ virtual void anchor();
// Default weight value. Used when we don't have information about the edge.
// TODO: DEFAULT_WEIGHT makes sense during static predication, when none of
diff --git a/include/llvm/CodeGen/MachineCodeEmitter.h b/include/llvm/CodeGen/MachineCodeEmitter.h
index 428aada7ba..86e8f27877 100644
--- a/include/llvm/CodeGen/MachineCodeEmitter.h
+++ b/include/llvm/CodeGen/MachineCodeEmitter.h
@@ -20,6 +20,8 @@
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/DebugLoc.h"
+#include <string>
+
namespace llvm {
class MachineBasicBlock;
@@ -49,6 +51,7 @@ class MCSymbol;
/// occurred, more memory is allocated, and we reemit the code into it.
///
class MachineCodeEmitter {
+ virtual void anchor();
protected:
/// BufferBegin/BufferEnd - Pointers to the start and end of the memory
/// allocated for this code buffer.
diff --git a/include/llvm/CodeGen/MachineConstantPool.h b/include/llvm/CodeGen/MachineConstantPool.h
index 29f4f443bf..d6d65a24de 100644
--- a/include/llvm/CodeGen/MachineConstantPool.h
+++ b/include/llvm/CodeGen/MachineConstantPool.h
@@ -34,6 +34,7 @@ class raw_ostream;
/// Abstract base class for all machine specific constantpool value subclasses.
///
class MachineConstantPoolValue {
+ virtual void anchor();
Type *Ty;
public:
diff --git a/include/llvm/CodeGen/MachinePassRegistry.h b/include/llvm/CodeGen/MachinePassRegistry.h
index 6ee2e90a9f..c41e8e26d6 100644
--- a/include/llvm/CodeGen/MachinePassRegistry.h
+++ b/include/llvm/CodeGen/MachinePassRegistry.h
@@ -33,6 +33,7 @@ typedef void *(*MachinePassCtor)();
///
//===----------------------------------------------------------------------===//
class MachinePassRegistryListener {
+ virtual void anchor();
public:
MachinePassRegistryListener() {}
virtual ~MachinePassRegistryListener() {}
diff --git a/include/llvm/CodeGen/ScheduleDAG.h b/include/llvm/CodeGen/ScheduleDAG.h
index 1bbc6c54d7..cdc4f433f3 100644
--- a/include/llvm/CodeGen/ScheduleDAG.h
+++ b/include/llvm/CodeGen/ScheduleDAG.h
@@ -427,6 +427,7 @@ namespace llvm {
/// implementation to decide.
///
class SchedulingPriorityQueue {
+ virtual void anchor();
unsigned CurCycle;
bool HasReadyFilter;
public:
diff --git a/include/llvm/CodeGen/SelectionDAGISel.h b/include/llvm/CodeGen/SelectionDAGISel.h
index 3c5c5df39a..c466175b68 100644
--- a/include/llvm/CodeGen/SelectionDAGISel.h
+++ b/include/llvm/CodeGen/SelectionDAGISel.h
@@ -181,6 +181,7 @@ protected:
/// ISelUpdater - helper class to handle updates of the
/// instruction selection graph.
class ISelUpdater : public SelectionDAG::DAGUpdateListener {
+ virtual void anchor();
SelectionDAG::allnodes_iterator &ISelPosition;
public:
explicit ISelUpdater(SelectionDAG::allnodes_iterator &isp)
diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h
index ecc1fe70cc..3ce8d2c243 100644
--- a/include/llvm/Constant.h
+++ b/include/llvm/Constant.h
@@ -41,6 +41,7 @@ namespace llvm {
class Constant : public User {
void operator=(const Constant &); // Do not implement
Constant(const Constant &); // Do not implement
+ virtual void anchor();
protected:
Constant(Type *ty, ValueTy vty, Use *Ops, unsigned NumOps)
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index 41e451f5a1..3182add096 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -45,6 +45,7 @@ struct ConvertConstantType;
/// represents both boolean and integral constants.
/// @brief Class for constant integers.
class ConstantInt : public Constant {
+ virtual void anchor();
void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
ConstantInt(const ConstantInt &); // DO NOT IMPLEMENT
ConstantInt(IntegerType *Ty, const APInt& V);
@@ -229,6 +230,7 @@ public:
///
class ConstantFP : public Constant {
APFloat Val;
+ virtual void anchor();
void *operator new(size_t, unsigned);// DO NOT IMPLEMENT
ConstantFP(const ConstantFP &); // DO NOT IMPLEMENT
friend class LLVMContextImpl;
diff --git a/include/llvm/MC/MCAsmInfoCOFF.h b/include/llvm/MC/MCAsmInfoCOFF.h
index ba699d7852..0ff3e127ed 100644
--- a/include/llvm/MC/MCAsmInfoCOFF.h
+++ b/include/llvm/MC/MCAsmInfoCOFF.h
@@ -14,17 +14,19 @@
namespace llvm {
class MCAsmInfoCOFF : public MCAsmInfo {
+ virtual void anchor();
protected:
explicit MCAsmInfoCOFF();
-
};
class MCAsmInfoMicrosoft : public MCAsmInfoCOFF {
+ virtual void anchor();
protected:
explicit MCAsmInfoMicrosoft();
};
class MCAsmInfoGNUCOFF : public MCAsmInfoCOFF {
+ virtual void anchor();
protected:
explicit MCAsmInfoGNUCOFF();
};
diff --git a/include/llvm/MC/MCAsmInfoDarwin.h b/include/llvm/MC/MCAsmInfoDarwin.h
index 1f6c49938c..af552de6e6 100644
--- a/include/llvm/MC/MCAsmInfoDarwin.h
+++ b/include/llvm/MC/MCAsmInfoDarwin.h
@@ -18,7 +18,9 @@
#include "llvm/MC/MCAsmInfo.h"
namespace llvm {
- struct MCAsmInfoDarwin : public MCAsmInfo {
+ class MCAsmInfoDarwin : public MCAsmInfo {
+ virtual void anchor();
+ public:
explicit MCAsmInfoDarwin();
};
}
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h
index 687dd0c140..2566241d11 100644
--- a/include/llvm/MC/MCAssembler.h
+++ b/include/llvm/MC/MCAssembler.h
@@ -106,6 +106,7 @@ public:
};
class MCDataFragment : public MCFragment {
+ virtual void anchor();
SmallString<32> Contents;
/// Fixups - The list of fixups in this fragment.
@@ -160,6 +161,8 @@ public:
// object with just the MCInst and a code size, then we should just change
// MCDataFragment to have an optional MCInst at its end.
class MCInstFragment : public MCFragment {
+ virtual void anchor();
+
/// Inst - The instruction this is a fragment for.
MCInst Inst;
@@ -215,6 +218,8 @@ public:
};
class MCAlignFragment : public MCFragment {
+ virtual void anchor();
+
/// Alignment - The alignment to ensure, in bytes.
unsigned Alignment;
@@ -263,6 +268,8 @@ public:
};
class MCFillFragment : public MCFragment {
+ virtual void anchor();
+
/// Value - Value to use for filling bytes.
int64_t Value;
@@ -300,6 +307,8 @@ public:
};
class MCOrgFragment : public MCFragment {
+ virtual void anchor();
+
/// Offset - The offset this fragment should start at.
const MCExpr *Offset;
@@ -327,6 +336,8 @@ public:
};
class MCLEBFragment : public MCFragment {
+ virtual void anchor();
+
/// Value - The value this fragment should contain.
const MCExpr *Value;
@@ -358,6 +369,8 @@ public:
};
class MCDwarfLineAddrFragment : public MCFragment {
+ virtual void anchor();
+
/// LineDelta - the value of the difference between the two line numbers
/// between two .loc dwarf directives.
int64_t LineDelta;
@@ -393,6 +406,8 @@ public:
};
class MCDwarfCallFrameFragment : public MCFragment {
+ virtual void anchor();
+
/// AddrDelta - The expression for the difference of the two symbols that
/// make up the address delta between two .cfi_* dwarf directives.
const MCExpr *AddrDelta;
diff --git a/include/llvm/Metadata.h b/include/llvm/Metadata.h
index 59b4b26196..9466a5791c 100644
--- a/include/llvm/Metadata.h
+++ b/include/llvm/Metadata.h
@@ -36,6 +36,7 @@ template<typename ValueSubClass, typename ItemParentClass>
/// These are used to efficiently contain a byte sequence for metadata.
/// MDString is always unnamed.
class MDString : public Value {
+ virtual void anchor();
MDString(const MDString &); // DO NOT IMPLEMENT
StringRef Str;
diff --git a/include/llvm/Object/Archive.h b/include/llvm/Object/Archive.h
index 9e1369a5c6..e6df85679d 100644
--- a/include/llvm/Object/Archive.h
+++ b/include/llvm/Object/Archive.h
@@ -22,6 +22,7 @@ namespace llvm {
namespace object {
class Archive : public Binary {
+ virtual void anchor();
public:
class Child {
const Archive *Parent;
diff --git a/include/llvm/Object/ObjectFile.h b/include/llvm/Object/ObjectFile.h
index fd180d4e58..29b7077038 100644
--- a/include/llvm/Object/ObjectFile.h
+++ b/include/llvm/Object/ObjectFile.h
@@ -232,7 +232,7 @@ const uint64_t UnknownAddressOrSize = ~0ULL;
/// Concrete instances of this object are created by createObjectFile, which
/// figure out which type to create.
class ObjectFile : public Binary {
-private:
+ virtual void anchor();
ObjectFile(); // = delete
ObjectFile(const ObjectFile &other); // = delete
diff --git a/include/llvm/TableGen/Record.h b/include/llvm/TableGen/Record.h
index 0cf1725a98..f9ade8f144 100644
--- a/include/llvm/TableGen/Record.h
+++ b/include/llvm/TableGen/Record.h
@@ -68,6 +68,7 @@ class RecordKeeper;
class RecTy {
ListRecTy *ListTy;
+ virtual void anchor();
public:
RecTy() : ListTy(0) {}
virtual ~RecTy() {}
@@ -489,6 +490,7 @@ RecTy *resolveTypes(RecTy *T1, RecTy *T2);
class Init {
Init(const Init &); // Do not define.
Init &operator=(const Init &); // Do not define.
+ virtual void anchor();
protected:
Init(void) {}
@@ -617,6 +619,7 @@ class UnsetInit : public Init {
UnsetInit() : Init() {}
UnsetInit(const UnsetInit &); // Do not define.
UnsetInit &operator=(const UnsetInit &Other); // Do not define.
+ virtual void anchor();
public:
static UnsetInit *get();
@@ -638,6 +641,7 @@ class BitInit : public Init {
explicit BitInit(bool V) : Value(V) {}
BitInit(const BitInit &Other); // Do not define.
BitInit &operator=(BitInit &Other); // Do not define.
+ virtual void anchor();
public:
static BitInit *get(bool V);
@@ -750,6 +754,7 @@ class StringInit : public TypedInit {
StringInit(const StringInit &Other); // Do not define.
StringInit &operator=(const StringInit &Other); // Do not define.
+ virtual void anchor();
public:
static StringInit *get(const std::string &V);
@@ -792,6 +797,7 @@ class CodeInit : public Init {
CodeInit(const CodeInit &Other); // Do not define.
CodeInit &operator=(const CodeInit &Other); // Do not define.
+ virtual void anchor();
public:
static CodeInit *get(const std::string &V);
diff --git a/include/llvm/TableGen/TableGenAction.h b/include/llvm/TableGen/TableGenAction.h
index 9f1c23c5b4..733ae62644 100644
--- a/include/llvm/TableGen/TableGenAction.h
+++ b/include/llvm/TableGen/TableGenAction.h
@@ -21,6 +21,7 @@ class raw_ostream;
class RecordKeeper;
class TableGenAction {
+ virtual void anchor();
public:
virtual ~TableGenAction() {}
diff --git a/include/llvm/TableGen/TableGenBackend.h b/include/llvm/TableGen/TableGenBackend.h
index 853f92e406..3f612def2c 100644
--- a/include/llvm/TableGen/TableGenBackend.h
+++ b/include/llvm/TableGen/TableGenBackend.h
@@ -24,6 +24,7 @@ class Record;
class RecordKeeper;
struct TableGenBackend {
+ virtual void anchor();
virtual ~TableGenBackend() {}
// run - All TableGen backends should implement the run method, which should
diff --git a/include/llvm/Target/TargetJITInfo.h b/include/llvm/Target/TargetJITInfo.h
index b198eb62f0..53e9ee0113 100644
--- a/include/llvm/Target/TargetJITInfo.h
+++ b/include/llvm/Target/TargetJITInfo.h
@@ -30,6 +30,7 @@ namespace llvm {
/// TargetJITInfo - Target specific information required by the Just-In-Time
/// code generator.
class TargetJITInfo {
+ virtual void anchor();
public:
virtual ~TargetJITInfo() {}
diff --git a/include/llvm/Target/TargetLibraryInfo.h b/include/llvm/Target/TargetLibraryInfo.h
index 0d7a949517..3fe22b94a0 100644
--- a/include/llvm/Target/TargetLibraryInfo.h
+++ b/include/llvm/Target/TargetLibraryInfo.h
@@ -208,6 +208,7 @@ namespace llvm {
/// library functions are available for the current target, and allows a
/// frontend to disable optimizations through -fno-builtin etc.
class TargetLibraryInfo : public ImmutablePass {
+ virtual void anchor();
unsigned char AvailableArray[(LibFunc::NumLibFuncs+3)/4];
llvm::DenseMap<unsigned, std::string> CustomNames;
static const char* StandardNames[LibFunc::NumLibFuncs];
diff --git a/include/llvm/Target/TargetRegisterInfo.h b/include/llvm/Target/TargetRegisterInfo.h
index 803ff9f0ed..cd30768a4a 100644
--- a/include/llvm/Target/TargetRegisterInfo.h
+++ b/include/llvm/Target/TargetRegisterInfo.h
@@ -38,6 +38,7 @@ public:
typedef const EVT* vt_iterator;
typedef const TargetRegisterClass* const * sc_iterator;
private:
+ virtual void anchor();
const MCRegisterClass *MC;
const vt_iterator VTs;
const unsigned *SubClassMask;
diff --git a/include/llvm/Transforms/Utils/SimplifyIndVar.h b/include/llvm/Transforms/Utils/SimplifyIndVar.h
index 21d433aa42..c9bd9163d7 100644
--- a/include/llvm/Transforms/Utils/SimplifyIndVar.h
+++ b/include/llvm/Transforms/Utils/SimplifyIndVar.h
@@ -33,6 +33,7 @@ class ScalarEvolution;
/// Interface for visiting interesting IV users that are recognized but not
/// simplified by this utility.
class IVVisitor {
+ virtual void anchor();
public:
virtual ~IVVisitor() {}
virtual void visitCast(CastInst *Cast) = 0;