From 41b5adf20208f46e4b1104d6d473710fbfa61eb9 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Wed, 14 Oct 2009 20:28:33 +0000 Subject: [PATCH] Remove a bunch of unused arguments from functions, silencing a warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84130 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/DenseMapInfo.h | 2 +- include/llvm/CodeGen/ScheduleDAG.h | 4 ++-- include/llvm/ExecutionEngine/JITMemoryManager.h | 2 +- include/llvm/Metadata.h | 6 +++--- include/llvm/Operator.h | 4 ++-- include/llvm/Pass.h | 4 ++-- include/llvm/Support/CommandLine.h | 4 ++-- include/llvm/Support/raw_ostream.h | 3 +-- 8 files changed, 14 insertions(+), 15 deletions(-) diff --git a/include/llvm/ADT/DenseMapInfo.h b/include/llvm/ADT/DenseMapInfo.h index 632728bf0d1..52ac5f9c5df 100644 --- a/include/llvm/ADT/DenseMapInfo.h +++ b/include/llvm/ADT/DenseMapInfo.h @@ -89,7 +89,7 @@ template<> struct DenseMapInfo { static inline unsigned long long getEmptyKey() { return ~0ULL; } static inline unsigned long long getTombstoneKey() { return ~0ULL - 1ULL; } static unsigned getHashValue(const unsigned long long& Val) { - return Val * 37ULL; + return (unsigned)Val * 37ULL; } static bool isPod() { return true; } static bool isEqual(const unsigned long long& LHS, diff --git a/include/llvm/CodeGen/ScheduleDAG.h b/include/llvm/CodeGen/ScheduleDAG.h index 39563f73306..281484ee3ee 100644 --- a/include/llvm/CodeGen/ScheduleDAG.h +++ b/include/llvm/CodeGen/ScheduleDAG.h @@ -500,8 +500,8 @@ namespace llvm { /// ComputeOperandLatency - Override dependence edge latency using /// operand use/def information /// - virtual void ComputeOperandLatency(SUnit *Def, SUnit *Use, - SDep& dep) const { }; + virtual void ComputeOperandLatency(SUnit *, SUnit *, + SDep&) const { }; /// Schedule - Order nodes according to selected style, filling /// in the Sequence member. diff --git a/include/llvm/ExecutionEngine/JITMemoryManager.h b/include/llvm/ExecutionEngine/JITMemoryManager.h index 21dee553474..9f6fb63fbe5 100644 --- a/include/llvm/ExecutionEngine/JITMemoryManager.h +++ b/include/llvm/ExecutionEngine/JITMemoryManager.h @@ -149,7 +149,7 @@ public: /// CheckInvariants - For testing only. Return true if all internal /// invariants are preserved, or return false and set ErrorStr to a helpful /// error message. - virtual bool CheckInvariants(std::string &ErrorStr) { + virtual bool CheckInvariants(std::string &) { return true; } diff --git a/include/llvm/Metadata.h b/include/llvm/Metadata.h index 63c2da2e7df..13b97b992ce 100644 --- a/include/llvm/Metadata.h +++ b/include/llvm/Metadata.h @@ -181,7 +181,7 @@ public: /// duplicates void Profile(FoldingSetNodeID &ID) const; - virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U) { + virtual void replaceUsesOfWithOnConstant(Value *, Value *, Use *) { llvm_unreachable("This should never be called because MDNodes have no ops"); } @@ -291,7 +291,7 @@ public: return false; } - virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U) { + virtual void replaceUsesOfWithOnConstant(Value *, Value *, Use *) { llvm_unreachable( "This should never be called because NamedMDNodes have no ops"); } @@ -361,7 +361,7 @@ public: /// ValueIsDeleted - This handler is used to update metadata store /// when a value is deleted. - void ValueIsDeleted(const Value *V) {} + void ValueIsDeleted(const Value *) {} void ValueIsDeleted(const Instruction *Inst) { removeMDs(Inst); } diff --git a/include/llvm/Operator.h b/include/llvm/Operator.h index 2b5cc57e75d..60865aa8ad4 100644 --- a/include/llvm/Operator.h +++ b/include/llvm/Operator.h @@ -57,8 +57,8 @@ public: } static inline bool classof(const Operator *) { return true; } - static inline bool classof(const Instruction *I) { return true; } - static inline bool classof(const ConstantExpr *I) { return true; } + static inline bool classof(const Instruction *) { return true; } + static inline bool classof(const ConstantExpr *) { return true; } static inline bool classof(const Value *V) { return isa(V) || isa(V); } diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h index eb4c92281c9..27919365227 100644 --- a/include/llvm/Pass.h +++ b/include/llvm/Pass.h @@ -276,7 +276,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. @@ -328,7 +328,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; } /// doInitialization - Virtual method overridden by BasicBlockPass subclasses /// to do any necessary per-function initialization. diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index dc73979bb09..ca32f75b288 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -660,7 +660,7 @@ template<> class parser : public basic_parser { public: // parse - Return true on error. - bool parse(Option &, StringRef ArgName, StringRef Arg, std::string &Value) { + bool parse(Option &, StringRef, StringRef Arg, std::string &Value) { Value = Arg.str(); return false; } @@ -681,7 +681,7 @@ template<> class parser : public basic_parser { public: // parse - Return true on error. - bool parse(Option &, StringRef ArgName, StringRef Arg, char &Value) { + bool parse(Option &, StringRef, StringRef Arg, char &Value) { Value = Arg[0]; return false; } diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h index 7827dd83804..30879b89dab 100644 --- a/include/llvm/Support/raw_ostream.h +++ b/include/llvm/Support/raw_ostream.h @@ -233,8 +233,7 @@ public: /// @param bold bold/brighter text, default false /// @param bg if true change the background, default: change foreground /// @returns itself so it can be used within << invocations - virtual raw_ostream &changeColor(enum Colors colors, bool bold=false, - bool bg=false) { return *this; } + virtual raw_ostream &changeColor(enum Colors, bool, bool) { return *this; } /// Resets the colors to terminal defaults. Call this when you are done /// outputting colored text, or before program exit. -- 2.34.1