forked from OSchip/llvm-project
parent
dc6fb77d35
commit
3a15e14520
|
@ -388,6 +388,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(BinaryOperator, Value)
|
||||||
/// if (isa<CastInst>(Instr)) { ... }
|
/// if (isa<CastInst>(Instr)) { ... }
|
||||||
/// @brief Base class of casting instructions.
|
/// @brief Base class of casting instructions.
|
||||||
class CastInst : public UnaryInstruction {
|
class CastInst : public UnaryInstruction {
|
||||||
|
virtual void anchor();
|
||||||
protected:
|
protected:
|
||||||
/// @brief Constructor with insert-before-instruction semantics for subclasses
|
/// @brief Constructor with insert-before-instruction semantics for subclasses
|
||||||
CastInst(Type *Ty, unsigned iType, Value *S,
|
CastInst(Type *Ty, unsigned iType, Value *S,
|
||||||
|
|
|
@ -326,6 +326,8 @@ LocationClass<Ty> location(Ty &L) { return LocationClass<Ty>(L); }
|
||||||
struct GenericOptionValue {
|
struct GenericOptionValue {
|
||||||
virtual ~GenericOptionValue() {}
|
virtual ~GenericOptionValue() {}
|
||||||
virtual bool compare(const GenericOptionValue &V) const = 0;
|
virtual bool compare(const GenericOptionValue &V) const = 0;
|
||||||
|
private:
|
||||||
|
virtual void anchor();
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class DataType> struct OptionValue;
|
template<class DataType> struct OptionValue;
|
||||||
|
@ -416,6 +418,8 @@ struct OptionValue<cl::boolOrDefault> : OptionValueCopy<cl::boolOrDefault> {
|
||||||
setValue(V);
|
setValue(V);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
private:
|
||||||
|
virtual void anchor();
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
|
@ -431,6 +435,8 @@ struct OptionValue<std::string> : OptionValueCopy<std::string> {
|
||||||
setValue(V);
|
setValue(V);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
private:
|
||||||
|
virtual void anchor();
|
||||||
};
|
};
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
|
@ -34,6 +34,7 @@ class User : public Value {
|
||||||
void *operator new(size_t); // Do not implement
|
void *operator new(size_t); // Do not implement
|
||||||
template <unsigned>
|
template <unsigned>
|
||||||
friend struct HungoffOperandTraits;
|
friend struct HungoffOperandTraits;
|
||||||
|
virtual void anchor();
|
||||||
protected:
|
protected:
|
||||||
/// OperandList - This is a pointer to the array of Uses for this User.
|
/// 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
|
/// For nodes of fixed arity (e.g. a binary operator) this array will live
|
||||||
|
|
|
@ -57,6 +57,9 @@ TEMPLATE_INSTANTIATION(class opt<char>);
|
||||||
TEMPLATE_INSTANTIATION(class opt<bool>);
|
TEMPLATE_INSTANTIATION(class opt<bool>);
|
||||||
} } // end namespace llvm::cl
|
} } // end namespace llvm::cl
|
||||||
|
|
||||||
|
void GenericOptionValue::anchor() {}
|
||||||
|
void OptionValue<boolOrDefault>::anchor() {}
|
||||||
|
void OptionValue<std::string>::anchor() {}
|
||||||
void Option::anchor() {}
|
void Option::anchor() {}
|
||||||
void basic_parser_impl::anchor() {}
|
void basic_parser_impl::anchor() {}
|
||||||
void parser<bool>::anchor() {}
|
void parser<bool>::anchor() {}
|
||||||
|
|
|
@ -2005,6 +2005,8 @@ bool BinaryOperator::isExact() const {
|
||||||
// CastInst Class
|
// CastInst Class
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
void CastInst::anchor() {}
|
||||||
|
|
||||||
// Just determine if this cast only deals with integral->integral conversion.
|
// Just determine if this cast only deals with integral->integral conversion.
|
||||||
bool CastInst::isIntegerCast() const {
|
bool CastInst::isIntegerCast() const {
|
||||||
switch (getOpcode()) {
|
switch (getOpcode()) {
|
||||||
|
|
|
@ -17,6 +17,8 @@ namespace llvm {
|
||||||
// User Class
|
// User Class
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
void User::anchor() {}
|
||||||
|
|
||||||
// replaceUsesOfWith - Replaces all references to the "From" definition with
|
// replaceUsesOfWith - Replaces all references to the "From" definition with
|
||||||
// references to the "To" definition.
|
// references to the "To" definition.
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue