[llvm] r251094 - Support, IR: silence -Wunused-parameter
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 23 08:26:41 PDT 2015
On Thursday, October 22, 2015, David Majnemer <david.majnemer at gmail.com>
wrote:
>
> On Thu, Oct 22, 2015 at 10:26 PM, Saleem Abdulrasool via llvm-commits <
> llvm-commits at lists.llvm.org
> <javascript:_e(%7B%7D,'cvml','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 have a strong opinion on this. As Aaron points out, consistency
would be nice. There were other instances of the names being removed, so I
went with that. If you think that the names here add sufficient value over
the inconsistency, I'm happy enough to restore them as comments.
>> 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
>> <javascript:_e(%7B%7D,'cvml','llvm-commits at lists.llvm.org');>
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
>
--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151023/df86761b/attachment.html>
More information about the llvm-commits
mailing list