[llvm] r251094 - Support, IR: silence -Wunused-parameter
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 22 22:40:34 PDT 2015
On Fri, Oct 23, 2015 at 1:34 AM, David Majnemer via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
>
> On Thu, Oct 22, 2015 at 10:26 PM, Saleem Abdulrasool via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>>
>> Author: compnerd
>> Date: Fri Oct 23 00:26:03 2015
>> New Revision: 251094
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=251094&view=rev
>> Log:
>> Support, IR: silence -Wunused-parameter
>>
>> If this is used outside of LLVM with -Werror, this would cause a failure.
>>
>> Modified:
>> llvm/trunk/include/llvm/IR/Metadata.h
>> llvm/trunk/include/llvm/IR/User.h
>> llvm/trunk/include/llvm/Support/CommandLine.h
>>
>> Modified: llvm/trunk/include/llvm/IR/Metadata.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Metadata.h?rev=251094&r1=251093&r2=251094&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/include/llvm/IR/Metadata.h (original)
>> +++ llvm/trunk/include/llvm/IR/Metadata.h Fri Oct 23 00:26:03 2015
>> @@ -914,13 +914,13 @@ private:
>> N->recalculateHash();
>> }
>> template <class NodeTy>
>> - static void dispatchRecalculateHash(NodeTy *N, std::false_type) {}
>> + static void dispatchRecalculateHash(NodeTy *, std::false_type) {}
>> template <class NodeTy>
>> static void dispatchResetHash(NodeTy *N, std::true_type) {
>> N->setHash(0);
>> }
>> template <class NodeTy>
>> - static void dispatchResetHash(NodeTy *N, std::false_type) {}
>> + static void dispatchResetHash(NodeTy *, std::false_type) {}
>>
>> public:
>> typedef const MDOperand *op_iterator;
>>
>> Modified: llvm/trunk/include/llvm/IR/User.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/User.h?rev=251094&r1=251093&r2=251094&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/include/llvm/IR/User.h (original)
>> +++ llvm/trunk/include/llvm/IR/User.h Fri Oct 23 00:26:03 2015
>> @@ -65,7 +65,7 @@ protected:
>> /// This is used for subclasses which have a fixed number of operands.
>> void *operator new(size_t Size, unsigned Us, unsigned DescBytes);
>>
>> - User(Type *ty, unsigned vty, Use *OpList, unsigned NumOps)
>> + User(Type *ty, unsigned vty, Use *, unsigned NumOps)
>> : Value(ty, vty) {
>> assert(NumOps < (1u << NumUserOperandsBits) && "Too many operands");
>> NumUserOperands = NumOps;
>
>
> I think it would be nicer to comment out the variable names instead of
> removing them. It makes perusing the headers a little easier.
I don't disagree, but we may want to consider putting that in the
style guideline. I've seen a lot of existing uses where we remove the
identifier instead, and it would be good to be consistent (since this
comes up somewhat regularly).
~Aaron
>
>>
>>
>> Modified: llvm/trunk/include/llvm/Support/CommandLine.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CommandLine.h?rev=251094&r1=251093&r2=251094&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/include/llvm/Support/CommandLine.h (original)
>> +++ llvm/trunk/include/llvm/Support/CommandLine.h Fri Oct 23 00:26:03 2015
>> @@ -714,7 +714,7 @@ public:
>> //
>> class basic_parser_impl { // non-template implementation of
>> basic_parser<t>
>> public:
>> - basic_parser_impl(Option &O) {}
>> + basic_parser_impl(Option &) {}
>>
>>
>> enum ValueExpected getValueExpectedFlagDefault() const {
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list