From 13d57320bd212483463d4f8992d5787b29eda5df Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 19 May 2008 20:15:12 +0000 Subject: [PATCH] Remove warnings about unused parameters and shadowed variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51266 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/SmallVector.h | 4 +- include/llvm/CodeGen/ScheduleDAG.h | 15 +++---- include/llvm/CodeGen/SelectionDAG.h | 4 +- include/llvm/CodeGen/SelectionDAGNodes.h | 18 ++++---- include/llvm/Constant.h | 4 +- include/llvm/Constants.h | 8 ++-- include/llvm/DerivedTypes.h | 22 +++++----- .../llvm/ExecutionEngine/ExecutionEngine.h | 4 +- include/llvm/GlobalValue.h | 4 +- include/llvm/GlobalVariable.h | 4 +- include/llvm/ModuleProvider.h | 6 +-- include/llvm/Pass.h | 22 +++++----- include/llvm/PassSupport.h | 12 +++--- include/llvm/Support/CommandLine.h | 14 +++--- include/llvm/Target/TargetMachine.h | 43 ++++++++++--------- include/llvm/Type.h | 2 +- include/llvm/User.h | 4 +- include/llvm/Value.h | 2 +- 18 files changed, 95 insertions(+), 97 deletions(-) diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index 2da6a788eba..c2e2c17ad28 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -300,8 +300,8 @@ public: bool operator==(const SmallVectorImpl &RHS) const { if (size() != RHS.size()) return false; - for (T *This = Begin, *That = RHS.Begin, *End = Begin+size(); - This != End; ++This, ++That) + for (T *This = Begin, *That = RHS.Begin, *E = Begin+size(); + This != E; ++This, ++That) if (*This != *That) return false; return true; diff --git a/include/llvm/CodeGen/ScheduleDAG.h b/include/llvm/CodeGen/ScheduleDAG.h index d49c7db6fde..218a3377d87 100644 --- a/include/llvm/CodeGen/ScheduleDAG.h +++ b/include/llvm/CodeGen/ScheduleDAG.h @@ -59,26 +59,23 @@ namespace llvm { /// other instruction is available, issue it first. /// * NoopHazard: issuing this instruction would break the program. If /// some other instruction can be issued, do so, otherwise issue a noop. - virtual HazardType getHazardType(SDNode *Node) { + virtual HazardType getHazardType(SDNode *) { return NoHazard; } /// EmitInstruction - This callback is invoked when an instruction is /// emitted, to advance the hazard state. - virtual void EmitInstruction(SDNode *Node) { - } + virtual void EmitInstruction(SDNode *) {} /// AdvanceCycle - This callback is invoked when no instructions can be /// issued on this cycle without a hazard. This should increment the /// internal state of the hazard recognizer so that previously "Hazard" /// instructions will now not be hazards. - virtual void AdvanceCycle() { - } + virtual void AdvanceCycle() {} /// EmitNoop - This callback is invoked when a noop was added to the /// instruction stream. - virtual void EmitNoop() { - } + virtual void EmitNoop() {} }; /// SDep - Scheduling dependency. It keeps track of dependent nodes, @@ -236,9 +233,9 @@ namespace llvm { /// ScheduledNode - As each node is scheduled, this method is invoked. This /// allows the priority function to adjust the priority of node that have /// already been emitted. - virtual void ScheduledNode(SUnit *Node) {} + virtual void ScheduledNode(SUnit *) {} - virtual void UnscheduledNode(SUnit *Node) {} + virtual void UnscheduledNode(SUnit *) {} }; class ScheduleDAG { diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index 02f5cbc9f62..5094f023f5b 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -162,8 +162,8 @@ public: MVT::ValueType VT3) { return getVTList(VT1, VT2, VT3).VTs; } - const MVT::ValueType *getNodeValueTypes(std::vector &VTList) { - return getVTList(&VTList[0], (unsigned)VTList.size()).VTs; + const MVT::ValueType *getNodeValueTypes(std::vector &vtList) { + return getVTList(&vtList[0], (unsigned)vtList.size()).VTs; } diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 5cfc1661a07..8388ab91f29 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -1964,15 +1964,15 @@ protected: */ SDUse Ops[4]; public: - LSBaseSDNode(ISD::NodeType NodeTy, SDOperand *Operands, unsigned NumOperands, + LSBaseSDNode(ISD::NodeType NodeTy, SDOperand *Operands, unsigned numOperands, SDVTList VTs, ISD::MemIndexedMode AM, MVT::ValueType VT, const Value *SV, int SVO, unsigned Align, bool Vol) : SDNode(NodeTy, VTs), AddrMode(AM), MemoryVT(VT), SrcValue(SV), SVOffset(SVO), Alignment(Align), IsVolatile(Vol) { - for (unsigned i = 0; i != NumOperands; ++i) + for (unsigned i = 0; i != numOperands; ++i) Ops[i] = Operands[i]; - InitOperands(Ops, NumOperands); + InitOperands(Ops, numOperands); assert(Align != 0 && "Loads and stores should have non-zero aligment"); assert((getOffset().getOpcode() == ISD::UNDEF || isIndexed()) && "Only indexed loads and stores have a non-undef offset operand"); @@ -2004,7 +2004,7 @@ public: /// reference performed by this load or store. MachineMemOperand getMemOperand() const; - static bool classof(const LSBaseSDNode *N) { return true; } + static bool classof(const LSBaseSDNode *) { return true; } static bool classof(const SDNode *N) { return N->getOpcode() == ISD::LOAD || N->getOpcode() == ISD::STORE; @@ -2134,11 +2134,11 @@ struct ilist_traits { //static SDNode *createNode(const SDNode &V) { return new SDNode(V); } - void addNodeToList(SDNode *NTy) {} - void removeNodeFromList(SDNode *NTy) {} - void transferNodesFromList(iplist &L2, - const ilist_iterator &X, - const ilist_iterator &Y) {} + void addNodeToList(SDNode *) {} + void removeNodeFromList(SDNode *) {} + void transferNodesFromList(iplist &, + const ilist_iterator &, + const ilist_iterator &) {} }; namespace ISD { diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h index c3373f2513c..d85771a09a4 100644 --- a/include/llvm/Constant.h +++ b/include/llvm/Constant.h @@ -39,8 +39,8 @@ class Constant : public User { void operator=(const Constant &); // Do not implement Constant(const Constant &); // Do not implement protected: - Constant(const Type *Ty, ValueTy vty, Use *Ops, unsigned NumOps) - : User(Ty, vty, Ops, NumOps) {} + Constant(const Type *ty, ValueTy vty, Use *Ops, unsigned NumOps) + : User(ty, vty, Ops, NumOps) {} void destroyConstantImpl(); public: diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index 65c3a737c83..48edac63b87 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -283,8 +283,8 @@ class ConstantAggregateZero : public Constant { void *operator new(size_t, unsigned); // DO NOT IMPLEMENT ConstantAggregateZero(const ConstantAggregateZero &); // DO NOT IMPLEMENT protected: - explicit ConstantAggregateZero(const Type *Ty) - : Constant(Ty, ConstantAggregateZeroVal, 0, 0) {} + explicit ConstantAggregateZero(const Type *ty) + : Constant(ty, ConstantAggregateZeroVal, 0, 0) {} protected: // allocate space for exactly zero operands void *operator new(size_t s) { @@ -553,8 +553,8 @@ class ConstantExpr : public Constant { friend struct ConvertConstantType; protected: - ConstantExpr(const Type *Ty, unsigned Opcode, Use *Ops, unsigned NumOps) - : Constant(Ty, ConstantExprVal, Ops, NumOps) { + ConstantExpr(const Type *ty, unsigned Opcode, Use *Ops, unsigned NumOps) + : Constant(ty, ConstantExprVal, Ops, NumOps) { // Operation type (an Instruction opcode) is stored as the SubclassData. SubclassData = Opcode; } diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h index 216c68cdfe7..d20085ead75 100644 --- a/include/llvm/DerivedTypes.h +++ b/include/llvm/DerivedTypes.h @@ -67,7 +67,7 @@ public: void dump() const { Type::dump(); } // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const DerivedType *T) { return true; } + static inline bool classof(const DerivedType *) { return true; } static inline bool classof(const Type *T) { return T->isDerivedType(); } @@ -127,7 +127,7 @@ public: bool isPowerOf2ByteWidth() const; // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const IntegerType *T) { return true; } + static inline bool classof(const IntegerType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == IntegerTyID; } @@ -179,7 +179,7 @@ public: virtual void typeBecameConcrete(const DerivedType *AbsTy); // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const FunctionType *T) { return true; } + static inline bool classof(const FunctionType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == FunctionTyID; } @@ -200,7 +200,7 @@ public: virtual bool indexValid(const Value *V) const = 0; // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const CompositeType *T) { return true; } + static inline bool classof(const CompositeType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == ArrayTyID || T->getTypeID() == StructTyID || @@ -253,7 +253,7 @@ public: virtual void typeBecameConcrete(const DerivedType *AbsTy); // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const StructType *T) { return true; } + static inline bool classof(const StructType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == StructTyID; } @@ -292,12 +292,12 @@ public: /// getTypeAtIndex - Given an index value into the type, return the type of /// the element. For sequential types, there is only one subtype... /// - virtual const Type *getTypeAtIndex(const Value *V) const { + virtual const Type *getTypeAtIndex(const Value *) const { return ContainedTys[0]; } // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SequentialType *T) { return true; } + static inline bool classof(const SequentialType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == ArrayTyID || T->getTypeID() == PointerTyID || @@ -328,7 +328,7 @@ public: virtual void typeBecameConcrete(const DerivedType *AbsTy); // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const ArrayType *T) { return true; } + static inline bool classof(const ArrayType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == ArrayTyID; } @@ -372,7 +372,7 @@ public: virtual void typeBecameConcrete(const DerivedType *AbsTy); // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const VectorType *T) { return true; } + static inline bool classof(const VectorType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == VectorTyID; } @@ -407,7 +407,7 @@ public: virtual void typeBecameConcrete(const DerivedType *AbsTy); // Implement support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const PointerType *T) { return true; } + static inline bool classof(const PointerType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == PointerTyID; } @@ -428,7 +428,7 @@ public: } // Implement support for type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const OpaqueType *T) { return true; } + static inline bool classof(const OpaqueType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == OpaqueTyID; } diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h index 1a6cdba7ea2..ff584733eec 100644 --- a/include/llvm/ExecutionEngine/ExecutionEngine.h +++ b/include/llvm/ExecutionEngine/ExecutionEngine.h @@ -50,12 +50,12 @@ private: public: std::map & - getGlobalAddressMap(const MutexGuard &locked) { + getGlobalAddressMap(const MutexGuard &) { return GlobalAddressMap; } std::map & - getGlobalAddressReverseMap(const MutexGuard& locked) { + getGlobalAddressReverseMap(const MutexGuard &) { return GlobalAddressReverseMap; } }; diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h index 60b2d1c5342..b13a122e1a3 100644 --- a/include/llvm/GlobalValue.h +++ b/include/llvm/GlobalValue.h @@ -50,9 +50,9 @@ public: }; protected: - GlobalValue(const Type *Ty, ValueTy vty, Use *Ops, unsigned NumOps, + GlobalValue(const Type *ty, ValueTy vty, Use *Ops, unsigned NumOps, LinkageTypes linkage, const std::string &name = "") - : Constant(Ty, vty, Ops, NumOps), Parent(0), + : Constant(ty, vty, Ops, NumOps), Parent(0), Linkage(linkage), Visibility(DefaultVisibility), Alignment(0) { if (!name.empty()) setName(name); } diff --git a/include/llvm/GlobalVariable.h b/include/llvm/GlobalVariable.h index 5a42e78a4ac..ac72b77e765 100644 --- a/include/llvm/GlobalVariable.h +++ b/include/llvm/GlobalVariable.h @@ -112,11 +112,11 @@ public: /// leads to undefined behavior. /// bool isConstant() const { return isConstantGlobal; } - void setConstant(bool Value) { isConstantGlobal = Value; } + void setConstant(bool Val) { isConstantGlobal = Val; } /// If the value is "Thread Local", its value isn't shared by the threads. bool isThreadLocal() const { return isThreadLocalSymbol; } - void setThreadLocal(bool Value) { isThreadLocalSymbol = Value; } + void setThreadLocal(bool Val) { isThreadLocalSymbol = Val; } /// removeFromParent - This method unlinks 'this' from the containing module, /// but does not delete it. diff --git a/include/llvm/ModuleProvider.h b/include/llvm/ModuleProvider.h index 65bcc763f1c..8a0a20c0ef6 100644 --- a/include/llvm/ModuleProvider.h +++ b/include/llvm/ModuleProvider.h @@ -48,7 +48,7 @@ public: /// it up to be materialized lazily. If the provider doesn't support this /// capability, this method is a noop. /// - virtual void dematerializeFunction(Function *F) {} + virtual void dematerializeFunction(Function *) {} /// materializeModule - make sure the entire Module has been completely read. /// On error, return null and fill in the error string if specified. @@ -77,10 +77,10 @@ struct ExistingModuleProvider : public ModuleProvider { explicit ExistingModuleProvider(Module *M) { TheModule = M; } - bool materializeFunction(Function *F, std::string *ErrInfo = 0) { + bool materializeFunction(Function *, std::string * = 0) { return false; } - Module* materializeModule(std::string *ErrInfo = 0) { return TheModule; } + Module* materializeModule(std::string * = 0) { return TheModule; } }; } // End llvm namespace diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h index e5af0c6dc70..bc6b39bbb31 100644 --- a/include/llvm/Pass.h +++ b/include/llvm/Pass.h @@ -109,10 +109,10 @@ public: /// Each pass is responsible for assigning a pass manager to itself. /// PMS is the stack of available pass manager. - virtual void assignPassManager(PMStack &PMS, - PassManagerType T = PMT_Unknown) {} + virtual void assignPassManager(PMStack &, + PassManagerType = PMT_Unknown) {} /// Check if available pass managers are suitable for this pass or not. - virtual void preparePassManager(PMStack &PMS) {} + virtual void preparePassManager(PMStack &) {} /// Return what kind of Pass Manager can manage this pass. virtual PassManagerType getPotentialPassManagerType() const { @@ -134,7 +134,7 @@ public: /// particular analysis result to this function, it can then use the /// getAnalysis() function, below. /// - virtual void getAnalysisUsage(AnalysisUsage &Info) const { + virtual void getAnalysisUsage(AnalysisUsage &) const { // By default, no analysis results are used, all are invalidated. } @@ -250,7 +250,7 @@ public: /// ImmutablePasses are never run. /// - bool runOnModule(Module &M) { return false; } + bool runOnModule(Module &) { return false; } explicit ImmutablePass(intptr_t pid) : ModulePass(pid) {} explicit ImmutablePass(const void *pid) @@ -277,7 +277,7 @@ public: /// doInitialization - Virtual method overridden by subclasses to do /// any necessary per-module initialization. /// - virtual bool doInitialization(Module &M) { return false; } + virtual bool doInitialization(Module &) { return false; } /// runOnFunction - Virtual method overriden by subclasses to do the /// per-function processing of the pass. @@ -287,7 +287,7 @@ public: /// doFinalization - Virtual method overriden by subclasses to do any post /// processing needed after all passes have run. /// - virtual bool doFinalization(Module &M) { return false; } + virtual bool doFinalization(Module &) { return false; } /// runOnModule - On a module, we run this pass by initializing, /// ronOnFunction'ing once for every function in the module, then by @@ -329,12 +329,12 @@ public: /// doInitialization - Virtual method overridden by subclasses to do /// any necessary per-module initialization. /// - virtual bool doInitialization(Module &M) { return false; } + virtual bool doInitialization(Module &) { return false; } /// doInitialization - Virtual method overridden by BasicBlockPass subclasses /// to do any necessary per-function initialization. /// - virtual bool doInitialization(Function &F) { return false; } + virtual bool doInitialization(Function &) { return false; } /// runOnBasicBlock - Virtual method overriden by subclasses to do the /// per-basicblock processing of the pass. @@ -344,12 +344,12 @@ public: /// doFinalization - Virtual method overriden by BasicBlockPass subclasses to /// do any post processing needed after all passes have run. /// - virtual bool doFinalization(Function &F) { return false; } + virtual bool doFinalization(Function &) { return false; } /// doFinalization - Virtual method overriden by subclasses to do any post /// processing needed after all passes have run. /// - virtual bool doFinalization(Module &M) { return false; } + virtual bool doFinalization(Module &) { return false; } // To run this pass on a function, we simply call runOnBasicBlock once for diff --git a/include/llvm/PassSupport.h b/include/llvm/PassSupport.h index af00725a32d..7121835a7e5 100644 --- a/include/llvm/PassSupport.h +++ b/include/llvm/PassSupport.h @@ -53,10 +53,10 @@ public: /// through RegisterPass. PassInfo(const char *name, const char *arg, intptr_t pi, NormalCtor_t normal = 0, - bool isCFGOnly = false, bool isAnalysis = false) + bool isCFGOnly = false, bool is_analysis = false) : PassName(name), PassArgument(arg), PassID(pi), IsCFGOnlyPass(isCFGOnly), - IsAnalysis(isAnalysis), IsAnalysisGroup(false), NormalCtor(normal) { + IsAnalysis(is_analysis), IsAnalysisGroup(false), NormalCtor(normal) { registerPass(); } /// PassInfo ctor - Do not call this directly, this should only be invoked @@ -169,10 +169,10 @@ struct RegisterPass : public PassInfo { // Register Pass using default constructor... RegisterPass(const char *PassArg, const char *Name, bool CFGOnly = false, - bool IsAnalysis = false) + bool is_analysis = false) : PassInfo(Name, PassArg, intptr_t(&passName::ID), PassInfo::NormalCtor_t(callDefaultCtor), - CFGOnly, IsAnalysis) { + CFGOnly, is_analysis) { } }; @@ -244,7 +244,7 @@ struct PassRegistrationListener { /// Callback functions - These functions are invoked whenever a pass is loaded /// or removed from the current executable. /// - virtual void passRegistered(const PassInfo *P) {} + virtual void passRegistered(const PassInfo *) {} /// enumeratePasses - Iterate over the registered passes, calling the /// passEnumerate callback on each PassInfo object. @@ -254,7 +254,7 @@ struct PassRegistrationListener { /// passEnumerate - Callback function invoked when someone calls /// enumeratePasses on this PassRegistrationListener object. /// - virtual void passEnumerate(const PassInfo *P) {} + virtual void passEnumerate(const PassInfo *) {} }; diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index f4db8c4bf8f..d1fef1fabe9 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -226,7 +226,7 @@ public: // virtual void printOptionInfo(size_t GlobalWidth) const = 0; - virtual void getExtraOptionNames(std::vector &OptionNames) {} + virtual void getExtraOptionNames(std::vector &) {} // addOccurrence - Wrapper around handleOccurrence that enforces Flags // @@ -324,10 +324,10 @@ public: Values.push_back(std::make_pair(EnumName, std::make_pair(Val, Desc))); // Process the varargs portion of the values... - while (const char *EnumName = va_arg(ValueArgs, const char *)) { + while (const char *enumName = va_arg(ValueArgs, const char *)) { DataType EnumVal = static_cast(va_arg(ValueArgs, int)); const char *EnumDesc = va_arg(ValueArgs, const char *); - Values.push_back(std::make_pair(EnumName, // Add value to value map + Values.push_back(std::make_pair(enumName, // Add value to value map std::make_pair(EnumVal, EnumDesc))); } } @@ -499,9 +499,9 @@ struct basic_parser_impl { // non-template implementation of basic_parser return ValueRequired; } - void getExtraOptionNames(std::vector &OptionNames) {} + void getExtraOptionNames(std::vector &) {} - void initialize(Option &O) {} + void initialize(Option &) {} // Return the width of the option tag for printing... size_t getOptionWidth(const Option &O) const; @@ -651,7 +651,7 @@ template<> class parser : public basic_parser { public: // parse - Return true on error. - bool parse(Option &O, const char *AN, const std::string &Arg, + bool parse(Option &, const char *, const std::string &Arg, std::string &Value) { Value = Arg; return false; @@ -1257,7 +1257,7 @@ public: class alias : public Option { Option *AliasFor; - virtual bool handleOccurrence(unsigned pos, const char *ArgName, + virtual bool handleOccurrence(unsigned pos, const char */*ArgName*/, const std::string &Arg) { return AliasFor->handleOccurrence(pos, AliasFor->ArgStr, Arg); } diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h index 7c86a8d7dbe..b495f85d349 100644 --- a/include/llvm/Target/TargetMachine.h +++ b/include/llvm/Target/TargetMachine.h @@ -99,7 +99,7 @@ public: /// used by the LLC tool to determine which target to use when an explicit /// -march option is not specified. If a target returns zero, it will never /// be chosen without an explicit -march option. - static unsigned getModuleMatchQuality(const Module &M) { return 0; } + static unsigned getModuleMatchQuality(const Module &) { return 0; } /// getJITMatchQuality - This static method should be implemented by targets /// that provide JIT capabilities to indicate how suitable they are for @@ -195,10 +195,10 @@ public: /// This method should return FileModel::Error if emission of this file type /// is not supported. /// - virtual FileModel::Model addPassesToEmitFile(PassManagerBase &PM, - std::ostream &Out, - CodeGenFileType FileType, - bool Fast) { + virtual FileModel::Model addPassesToEmitFile(PassManagerBase &, + std::ostream &, + CodeGenFileType, + bool /*Fast*/) { return FileModel::None; } @@ -206,8 +206,8 @@ public: /// to be split up (e.g., to add an object writer pass), this method can be /// used to finish up adding passes to emit the file, if necessary. /// - virtual bool addPassesToEmitFileFinish(PassManagerBase &PM, - MachineCodeEmitter *MCE, bool Fast) { + virtual bool addPassesToEmitFileFinish(PassManagerBase &, + MachineCodeEmitter *, bool /*Fast*/) { return true; } @@ -217,8 +217,9 @@ public: /// of functions. This method returns true if machine code emission is /// not supported. /// - virtual bool addPassesToEmitMachineCode(PassManagerBase &PM, - MachineCodeEmitter &MCE, bool Fast) { + virtual bool addPassesToEmitMachineCode(PassManagerBase &, + MachineCodeEmitter &, + bool /*Fast*/) { return true; } @@ -226,8 +227,8 @@ public: /// require having the entire module at once. This is not recommended, do not /// use this. virtual bool WantsWholeFile() const { return false; } - virtual bool addPassesToEmitWholeFile(PassManager &PM, std::ostream &Out, - CodeGenFileType FileType, bool Fast) { + virtual bool addPassesToEmitWholeFile(PassManager &, std::ostream &, + CodeGenFileType, bool /*Fast*/) { return true; } }; @@ -277,14 +278,14 @@ public: /// addInstSelector - This method should add any "last minute" LLVM->LLVM /// passes, then install an instruction selector pass, which converts from /// LLVM code to machine instructions. - virtual bool addInstSelector(PassManagerBase &PM, bool Fast) { + virtual bool addInstSelector(PassManagerBase &, bool /*Fast*/) { return true; } /// addPreRegAllocPasses - This method may be implemented by targets that want /// to run passes immediately before register allocation. This should return /// true if -print-machineinstrs should print after these passes. - virtual bool addPreRegAlloc(PassManagerBase &PM, bool Fast) { + virtual bool addPreRegAlloc(PassManagerBase &, bool /*Fast*/) { return false; } @@ -292,14 +293,14 @@ public: /// want to run passes after register allocation but before prolog-epilog /// insertion. This should return true if -print-machineinstrs should print /// after these passes. - virtual bool addPostRegAlloc(PassManagerBase &PM, bool Fast) { + virtual bool addPostRegAlloc(PassManagerBase &, bool /*Fast*/) { return false; } /// addPreEmitPass - This pass may be implemented by targets that want to run /// passes immediately before machine code is emitted. This should return /// true if -print-machineinstrs should print out the code after the passes. - virtual bool addPreEmitPass(PassManagerBase &PM, bool Fast) { + virtual bool addPreEmitPass(PassManagerBase &, bool /*Fast*/) { return false; } @@ -307,16 +308,16 @@ public: /// addAssemblyEmitter - This pass should be overridden by the target to add /// the asmprinter, if asm emission is supported. If this is not supported, /// 'true' should be returned. - virtual bool addAssemblyEmitter(PassManagerBase &PM, bool Fast, - std::ostream &Out) { + virtual bool addAssemblyEmitter(PassManagerBase &, bool /*Fast*/, + std::ostream &) { return true; } /// addCodeEmitter - This pass should be overridden by the target to add a /// code emitter, if supported. If this is not supported, 'true' should be /// returned. If DumpAsm is true, the generated assembly is printed to cerr. - virtual bool addCodeEmitter(PassManagerBase &PM, bool Fast, bool DumpAsm, - MachineCodeEmitter &MCE) { + virtual bool addCodeEmitter(PassManagerBase &, bool /*Fast*/, + bool /*DumpAsm*/, MachineCodeEmitter &) { return true; } @@ -324,8 +325,8 @@ public: /// a code emitter (without setting flags), if supported. If this is not /// supported, 'true' should be returned. If DumpAsm is true, the generated /// assembly is printed to cerr. - virtual bool addSimpleCodeEmitter(PassManagerBase &PM, bool Fast, - bool DumpAsm, MachineCodeEmitter &MCE) { + virtual bool addSimpleCodeEmitter(PassManagerBase &, bool /*Fast*/, + bool /*DumpAsm*/, MachineCodeEmitter &) { return true; } diff --git a/include/llvm/Type.h b/include/llvm/Type.h index 1ee84e2cabe..48ed04027b6 100644 --- a/include/llvm/Type.h +++ b/include/llvm/Type.h @@ -293,7 +293,7 @@ public: static const IntegerType *Int1Ty, *Int8Ty, *Int16Ty, *Int32Ty, *Int64Ty; /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Type *T) { return true; } + static inline bool classof(const Type *) { return true; } void addRef() const { assert(isAbstract() && "Cannot add a reference to a non-abstract type!"); diff --git a/include/llvm/User.h b/include/llvm/User.h index 44beac2ff89..31d71fbf10e 100644 --- a/include/llvm/User.h +++ b/include/llvm/User.h @@ -228,8 +228,8 @@ protected: unsigned NumOperands; void *operator new(size_t s, unsigned Us); - User(const Type *Ty, unsigned vty, Use *OpList, unsigned NumOps) - : Value(Ty, vty), OperandList(OpList), NumOperands(NumOps) {} + User(const Type *ty, unsigned vty, Use *OpList, unsigned NumOps) + : Value(ty, vty), OperandList(OpList), NumOperands(NumOps) {} Use *allocHungoffUses(unsigned) const; void dropHungoffUses(Use *U) { if (OperandList == U) { diff --git a/include/llvm/Value.h b/include/llvm/Value.h index 2d6351d5304..efac8e88f76 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -232,7 +232,7 @@ inline std::ostream &operator<<(std::ostream &OS, const Value &V) { return OS; } -void Use::init(Value *V, User *user) { +void Use::init(Value *V, User *) { Val = V; if (V) V->addUse(*this); } -- 2.34.1