mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Public and private corrections, warned about by icc (#304).
Patch by Erick Tryzelaar. llvm-svn: 81107
This commit is contained in:
parent
10c1356bad
commit
750b1f5de2
@ -26,7 +26,7 @@
|
||||
|
||||
namespace llvm {
|
||||
|
||||
struct IdentityFunctor : std::unary_function<unsigned, unsigned> {
|
||||
struct IdentityFunctor : public std::unary_function<unsigned, unsigned> {
|
||||
unsigned operator()(unsigned Index) const {
|
||||
return Index;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ namespace llvm {
|
||||
|
||||
template <unsigned ElementSize = 128>
|
||||
struct SparseBitVectorElement
|
||||
: ilist_node<SparseBitVectorElement<ElementSize> > {
|
||||
: public ilist_node<SparseBitVectorElement<ElementSize> > {
|
||||
public:
|
||||
typedef unsigned long BitWord;
|
||||
enum {
|
||||
|
@ -121,15 +121,15 @@ struct ilist_node_traits {
|
||||
/// for all common operations.
|
||||
///
|
||||
template<typename NodeTy>
|
||||
struct ilist_default_traits : ilist_nextprev_traits<NodeTy>,
|
||||
ilist_sentinel_traits<NodeTy>,
|
||||
ilist_node_traits<NodeTy> {
|
||||
struct ilist_default_traits : public ilist_nextprev_traits<NodeTy>,
|
||||
public ilist_sentinel_traits<NodeTy>,
|
||||
public ilist_node_traits<NodeTy> {
|
||||
};
|
||||
|
||||
// Template traits for intrusive list. By specializing this template class, you
|
||||
// can change what next/prev fields are used to store the links...
|
||||
template<typename NodeTy>
|
||||
struct ilist_traits : ilist_default_traits<NodeTy> {};
|
||||
struct ilist_traits : public ilist_default_traits<NodeTy> {};
|
||||
|
||||
// Const traits are the same as nonconst traits...
|
||||
template<typename Ty>
|
||||
|
@ -40,7 +40,7 @@ struct ilist_nextprev_traits;
|
||||
/// that use ilist_nextprev_traits or ilist_default_traits.
|
||||
///
|
||||
template<typename NodeTy>
|
||||
class ilist_node : ilist_half_node<NodeTy> {
|
||||
class ilist_node : private ilist_half_node<NodeTy> {
|
||||
friend struct ilist_nextprev_traits<NodeTy>;
|
||||
friend struct ilist_traits<NodeTy>;
|
||||
NodeTy *Next;
|
||||
|
@ -22,7 +22,7 @@ namespace llvm {
|
||||
struct LibCallFunctionInfo;
|
||||
|
||||
/// LibCallAliasAnalysis - Alias analysis driven from LibCallInfo.
|
||||
struct LibCallAliasAnalysis : public FunctionPass, AliasAnalysis {
|
||||
struct LibCallAliasAnalysis : public FunctionPass, public AliasAnalysis {
|
||||
static char ID; // Class identification
|
||||
|
||||
LibCallInfo *LCI;
|
||||
|
@ -397,7 +397,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<ConstantArray> : VariadicOperandTraits<> {
|
||||
struct OperandTraits<ConstantArray> : public VariadicOperandTraits<> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS(ConstantArray, Constant)
|
||||
@ -447,7 +447,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<ConstantStruct> : VariadicOperandTraits<> {
|
||||
struct OperandTraits<ConstantStruct> : public VariadicOperandTraits<> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS(ConstantStruct, Constant)
|
||||
@ -503,7 +503,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<ConstantVector> : VariadicOperandTraits<> {
|
||||
struct OperandTraits<ConstantVector> : public VariadicOperandTraits<> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS(ConstantVector, Constant)
|
||||
@ -795,7 +795,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<ConstantExpr> : VariadicOperandTraits<1> {
|
||||
struct OperandTraits<ConstantExpr> : public VariadicOperandTraits<1> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS(ConstantExpr, Constant)
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<GlobalAlias> : FixedNumOperandTraits<1> {
|
||||
struct OperandTraits<GlobalAlias> : public FixedNumOperandTraits<1> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(GlobalAlias, Value)
|
||||
|
@ -151,7 +151,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<GlobalVariable> : OptionalOperandTraits<> {
|
||||
struct OperandTraits<GlobalVariable> : public OptionalOperandTraits<> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(GlobalVariable, Value)
|
||||
|
@ -130,7 +130,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<UnaryInstruction> : FixedNumOperandTraits<1> {
|
||||
struct OperandTraits<UnaryInstruction> : public FixedNumOperandTraits<1> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(UnaryInstruction, Value)
|
||||
@ -298,7 +298,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<BinaryOperator> : FixedNumOperandTraits<2> {
|
||||
struct OperandTraits<BinaryOperator> : public FixedNumOperandTraits<2> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(BinaryOperator, Value)
|
||||
@ -711,7 +711,7 @@ public:
|
||||
|
||||
// FIXME: these are redundant if CmpInst < BinaryOperator
|
||||
template <>
|
||||
struct OperandTraits<CmpInst> : FixedNumOperandTraits<2> {
|
||||
struct OperandTraits<CmpInst> : public FixedNumOperandTraits<2> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CmpInst, Value)
|
||||
|
@ -363,7 +363,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<StoreInst> : FixedNumOperandTraits<2> {
|
||||
struct OperandTraits<StoreInst> : public FixedNumOperandTraits<2> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(StoreInst, Value)
|
||||
@ -613,7 +613,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<GetElementPtrInst> : VariadicOperandTraits<1> {
|
||||
struct OperandTraits<GetElementPtrInst> : public VariadicOperandTraits<1> {
|
||||
};
|
||||
|
||||
template<typename InputIterator>
|
||||
@ -1144,7 +1144,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<CallInst> : VariadicOperandTraits<1> {
|
||||
struct OperandTraits<CallInst> : public VariadicOperandTraits<1> {
|
||||
};
|
||||
|
||||
template<typename InputIterator>
|
||||
@ -1241,7 +1241,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<SelectInst> : FixedNumOperandTraits<3> {
|
||||
struct OperandTraits<SelectInst> : public FixedNumOperandTraits<3> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(SelectInst, Value)
|
||||
@ -1322,7 +1322,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<ExtractElementInst> : FixedNumOperandTraits<2> {
|
||||
struct OperandTraits<ExtractElementInst> : public FixedNumOperandTraits<2> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ExtractElementInst, Value)
|
||||
@ -1379,7 +1379,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<InsertElementInst> : FixedNumOperandTraits<3> {
|
||||
struct OperandTraits<InsertElementInst> : public FixedNumOperandTraits<3> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(InsertElementInst, Value)
|
||||
@ -1435,7 +1435,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<ShuffleVectorInst> : FixedNumOperandTraits<3> {
|
||||
struct OperandTraits<ShuffleVectorInst> : public FixedNumOperandTraits<3> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ShuffleVectorInst, Value)
|
||||
@ -1770,7 +1770,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<InsertValueInst> : FixedNumOperandTraits<2> {
|
||||
struct OperandTraits<InsertValueInst> : public FixedNumOperandTraits<2> {
|
||||
};
|
||||
|
||||
template<typename InputIterator>
|
||||
@ -1971,7 +1971,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<PHINode> : HungoffOperandTraits<2> {
|
||||
struct OperandTraits<PHINode> : public HungoffOperandTraits<2> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(PHINode, Value)
|
||||
@ -2047,7 +2047,7 @@ public:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<ReturnInst> : OptionalOperandTraits<> {
|
||||
struct OperandTraits<ReturnInst> : public OptionalOperandTraits<> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ReturnInst, Value)
|
||||
@ -2155,7 +2155,7 @@ private:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<BranchInst> : VariadicOperandTraits<1> {};
|
||||
struct OperandTraits<BranchInst> : public VariadicOperandTraits<1> {};
|
||||
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(BranchInst, Value)
|
||||
|
||||
@ -2304,7 +2304,7 @@ private:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<SwitchInst> : HungoffOperandTraits<2> {
|
||||
struct OperandTraits<SwitchInst> : public HungoffOperandTraits<2> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(SwitchInst, Value)
|
||||
@ -2522,7 +2522,7 @@ private:
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<InvokeInst> : VariadicOperandTraits<3> {
|
||||
struct OperandTraits<InvokeInst> : public VariadicOperandTraits<3> {
|
||||
};
|
||||
|
||||
template<typename InputIterator>
|
||||
|
@ -44,7 +44,7 @@ struct FixedNumOperandTraits {
|
||||
};
|
||||
template <class U>
|
||||
struct Layout {
|
||||
struct overlay : prefix, U {
|
||||
struct overlay : public prefix, public U {
|
||||
overlay(); // DO NOT IMPLEMENT
|
||||
};
|
||||
};
|
||||
@ -55,7 +55,7 @@ struct FixedNumOperandTraits {
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
template <unsigned ARITY = 1>
|
||||
struct OptionalOperandTraits : FixedNumOperandTraits<ARITY> {
|
||||
struct OptionalOperandTraits : public FixedNumOperandTraits<ARITY> {
|
||||
static unsigned operands(const User *U) {
|
||||
return U->getNumOperands();
|
||||
}
|
||||
|
@ -34,7 +34,8 @@ struct RecyclerStruct {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct ilist_traits<RecyclerStruct> : ilist_default_traits<RecyclerStruct> {
|
||||
struct ilist_traits<RecyclerStruct> :
|
||||
public ilist_default_traits<RecyclerStruct> {
|
||||
static RecyclerStruct *getPrev(const RecyclerStruct *t) { return t->Prev; }
|
||||
static RecyclerStruct *getNext(const RecyclerStruct *t) { return t->Next; }
|
||||
static void setPrev(RecyclerStruct *t, RecyclerStruct *p) { t->Prev = p; }
|
||||
|
@ -687,7 +687,7 @@ public:
|
||||
|
||||
|
||||
// This is useful when building IndexedMaps keyed on virtual registers
|
||||
struct VirtReg2IndexFunctor : std::unary_function<unsigned, unsigned> {
|
||||
struct VirtReg2IndexFunctor : public std::unary_function<unsigned, unsigned> {
|
||||
unsigned operator()(unsigned Reg) const {
|
||||
return Reg - TargetRegisterInfo::FirstVirtualRegister;
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ namespace {
|
||||
|
||||
// FIXME: can we inherit this from ConstantExpr?
|
||||
template <>
|
||||
struct OperandTraits<ConstantPlaceHolder> : FixedNumOperandTraits<1> {
|
||||
struct OperandTraits<ConstantPlaceHolder> : public FixedNumOperandTraits<1> {
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -235,54 +235,54 @@ struct CompareConstantExpr : public ConstantExpr {
|
||||
};
|
||||
|
||||
template <>
|
||||
struct OperandTraits<UnaryConstantExpr> : FixedNumOperandTraits<1> {
|
||||
struct OperandTraits<UnaryConstantExpr> : public FixedNumOperandTraits<1> {
|
||||
};
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(UnaryConstantExpr, Value)
|
||||
|
||||
template <>
|
||||
struct OperandTraits<BinaryConstantExpr> : FixedNumOperandTraits<2> {
|
||||
struct OperandTraits<BinaryConstantExpr> : public FixedNumOperandTraits<2> {
|
||||
};
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(BinaryConstantExpr, Value)
|
||||
|
||||
template <>
|
||||
struct OperandTraits<SelectConstantExpr> : FixedNumOperandTraits<3> {
|
||||
struct OperandTraits<SelectConstantExpr> : public FixedNumOperandTraits<3> {
|
||||
};
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(SelectConstantExpr, Value)
|
||||
|
||||
template <>
|
||||
struct OperandTraits<ExtractElementConstantExpr> : FixedNumOperandTraits<2> {
|
||||
struct OperandTraits<ExtractElementConstantExpr> : public FixedNumOperandTraits<2> {
|
||||
};
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ExtractElementConstantExpr, Value)
|
||||
|
||||
template <>
|
||||
struct OperandTraits<InsertElementConstantExpr> : FixedNumOperandTraits<3> {
|
||||
struct OperandTraits<InsertElementConstantExpr> : public FixedNumOperandTraits<3> {
|
||||
};
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(InsertElementConstantExpr, Value)
|
||||
|
||||
template <>
|
||||
struct OperandTraits<ShuffleVectorConstantExpr> : FixedNumOperandTraits<3> {
|
||||
struct OperandTraits<ShuffleVectorConstantExpr> : public FixedNumOperandTraits<3> {
|
||||
};
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ShuffleVectorConstantExpr, Value)
|
||||
|
||||
template <>
|
||||
struct OperandTraits<ExtractValueConstantExpr> : FixedNumOperandTraits<1> {
|
||||
struct OperandTraits<ExtractValueConstantExpr> : public FixedNumOperandTraits<1> {
|
||||
};
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ExtractValueConstantExpr, Value)
|
||||
|
||||
template <>
|
||||
struct OperandTraits<InsertValueConstantExpr> : FixedNumOperandTraits<2> {
|
||||
struct OperandTraits<InsertValueConstantExpr> : public FixedNumOperandTraits<2> {
|
||||
};
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(InsertValueConstantExpr, Value)
|
||||
|
||||
template <>
|
||||
struct OperandTraits<GetElementPtrConstantExpr> : VariadicOperandTraits<1> {
|
||||
struct OperandTraits<GetElementPtrConstantExpr> : public VariadicOperandTraits<1> {
|
||||
};
|
||||
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(GetElementPtrConstantExpr, Value)
|
||||
|
||||
|
||||
template <>
|
||||
struct OperandTraits<CompareConstantExpr> : FixedNumOperandTraits<2> {
|
||||
struct OperandTraits<CompareConstantExpr> : public FixedNumOperandTraits<2> {
|
||||
};
|
||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CompareConstantExpr, Value)
|
||||
|
||||
|
@ -128,7 +128,7 @@ void Use::zap(Use *Start, const Use *Stop, bool del) {
|
||||
// AugmentedUse layout struct
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
struct AugmentedUse : Use {
|
||||
struct AugmentedUse : public Use {
|
||||
PointerIntPair<User*, 1, Tag> ref;
|
||||
AugmentedUse(); // not implemented
|
||||
};
|
||||
|
@ -106,7 +106,7 @@ static const PassInfo *const PreVerifyID = &PreVer;
|
||||
|
||||
namespace {
|
||||
struct VISIBILITY_HIDDEN
|
||||
Verifier : public FunctionPass, InstVisitor<Verifier> {
|
||||
Verifier : public FunctionPass, public InstVisitor<Verifier> {
|
||||
static char ID; // Pass ID, replacement for typeid
|
||||
bool Broken; // Is this module found to be broken?
|
||||
bool RealPass; // Are we not being run by a PassManager?
|
||||
|
Loading…
Reference in New Issue
Block a user