Add some missing anchors.

llvm-svn: 145578
This commit is contained in:
David Blaikie 2011-12-01 08:00:17 +00:00
parent dc6fb77d35
commit 3a15e14520
6 changed files with 15 additions and 0 deletions

View 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,

View 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();
};
//===----------------------------------------------------------------------===//

View 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

View 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() {}

View 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()) {

View 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.
//