Add some missing anchors.
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 1 Dec 2011 08:00:17 +0000 (08:00 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 1 Dec 2011 08:00:17 +0000 (08:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145578 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/InstrTypes.h
include/llvm/Support/CommandLine.h
include/llvm/User.h
lib/Support/CommandLine.cpp
lib/VMCore/Instructions.cpp
lib/VMCore/User.cpp

index a1492f3c141aa88bacd140a6990db491271ae66d..2529f24fe991199f00faae4db14ad9d4001fe86b 100644 (file)
@@ -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,
index c6b62a8df9a4d8cf67bae0ca07a74e97c97af915..a2990e4eb31bd36f17bc6e4fd937dae29a81482a 100644 (file)
@@ -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();
 };
 
 //===----------------------------------------------------------------------===//
index 62bc9f034618492629fe718763e0992aad9cac8f..d3f4f217b928be23b06030acd2b6bad86b04d5ee 100644 (file)
@@ -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
index 4b43ae9cf24aad92be02e046428a7bde417d6dda..ce9344954bcc3ca1c564c207228916cb0523d309 100644 (file)
@@ -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() {}
index c8dcdc8ac39e3e8cba4295ccf24ef9e279b11104..6fa904e4e44cb263c31c96f470f02207cd33965d 100644 (file)
@@ -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()) {
index f01fa349adfd5f211d7cb57e047b43aea5314548..5f35ce4b9a4f0bee483d470b9fcdd425bd13f1ca 100644 (file)
@@ -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.
 //