diff options
author | David Blaikie <dblaikie@gmail.com> | 2011-12-01 08:00:17 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2011-12-01 08:00:17 +0000 |
commit | 0becc96b243da058f6d8901128b173d192db5148 (patch) | |
tree | 102944ebf9009fb62a777baf2934d3172b6c022d | |
parent | 522fb8cc01da6367c1c0fa52c1fcee7b133bfb34 (diff) | |
download | external_llvm-0becc96b243da058f6d8901128b173d192db5148.zip external_llvm-0becc96b243da058f6d8901128b173d192db5148.tar.gz external_llvm-0becc96b243da058f6d8901128b173d192db5148.tar.bz2 |
Add some missing anchors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145578 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/InstrTypes.h | 1 | ||||
-rw-r--r-- | include/llvm/Support/CommandLine.h | 6 | ||||
-rw-r--r-- | include/llvm/User.h | 1 | ||||
-rw-r--r-- | lib/Support/CommandLine.cpp | 3 | ||||
-rw-r--r-- | lib/VMCore/Instructions.cpp | 2 | ||||
-rw-r--r-- | lib/VMCore/User.cpp | 2 |
6 files changed, 15 insertions, 0 deletions
diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h index a1492f3..2529f24 100644 --- a/include/llvm/InstrTypes.h +++ b/include/llvm/InstrTypes.h @@ -388,6 +388,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(BinaryOperator, Value) /// if (isa<CastInst>(Instr)) { ... } /// @brief Base class of casting instructions. class CastInst : public UnaryInstruction { + virtual void anchor(); protected: /// @brief Constructor with insert-before-instruction semantics for subclasses CastInst(Type *Ty, unsigned iType, Value *S, diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index c6b62a8..a2990e4 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -326,6 +326,8 @@ LocationClass<Ty> location(Ty &L) { return LocationClass<Ty>(L); } struct GenericOptionValue { virtual ~GenericOptionValue() {} virtual bool compare(const GenericOptionValue &V) const = 0; +private: + virtual void anchor(); }; template<class DataType> struct OptionValue; @@ -416,6 +418,8 @@ struct OptionValue<cl::boolOrDefault> : OptionValueCopy<cl::boolOrDefault> { setValue(V); return *this; } +private: + virtual void anchor(); }; template<> @@ -431,6 +435,8 @@ struct OptionValue<std::string> : OptionValueCopy<std::string> { setValue(V); return *this; } +private: + virtual void anchor(); }; //===----------------------------------------------------------------------===// diff --git a/include/llvm/User.h b/include/llvm/User.h index 62bc9f0..d3f4f21 100644 --- a/include/llvm/User.h +++ b/include/llvm/User.h @@ -34,6 +34,7 @@ class User : public Value { void *operator new(size_t); // Do not implement template <unsigned> friend struct HungoffOperandTraits; + virtual void anchor(); protected: /// OperandList - This is a pointer to the array of Uses for this User. /// For nodes of fixed arity (e.g. a binary operator) this array will live diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index 4b43ae9..ce93449 100644 --- a/lib/Support/CommandLine.cpp +++ b/lib/Support/CommandLine.cpp @@ -57,6 +57,9 @@ TEMPLATE_INSTANTIATION(class opt<char>); TEMPLATE_INSTANTIATION(class opt<bool>); } } // end namespace llvm::cl +void GenericOptionValue::anchor() {} +void OptionValue<boolOrDefault>::anchor() {} +void OptionValue<std::string>::anchor() {} void Option::anchor() {} void basic_parser_impl::anchor() {} void parser<bool>::anchor() {} diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index c8dcdc8..6fa904e 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -2005,6 +2005,8 @@ bool BinaryOperator::isExact() const { // CastInst Class //===----------------------------------------------------------------------===// +void CastInst::anchor() {} + // Just determine if this cast only deals with integral->integral conversion. bool CastInst::isIntegerCast() const { switch (getOpcode()) { diff --git a/lib/VMCore/User.cpp b/lib/VMCore/User.cpp index f01fa34..5f35ce4 100644 --- a/lib/VMCore/User.cpp +++ b/lib/VMCore/User.cpp @@ -17,6 +17,8 @@ namespace llvm { // User Class //===----------------------------------------------------------------------===// +void User::anchor() {} + // replaceUsesOfWith - Replaces all references to the "From" definition with // references to the "To" definition. // |