[lld] r188988 - [lld][test] fix -Wreturn-type error

Shankar Easwaran shankare at codeaurora.org
Thu Aug 22 08:14:58 PDT 2013


Thanks for noting that, will fix it.

On 8/22/2013 1:58 AM, David Blaikie wrote:
> On Aug 21, 2013 10:48 PM, "Shankar Easwaran" <shankare at codeaurora.org>
> wrote:
>> Author: shankare
>> Date: Thu Aug 22 00:44:08 2013
>> New Revision: 188988
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=188988&view=rev
>> Log:
>> [lld][test] fix -Wreturn-type error
>>
>> Modified:
>>      lld/trunk/unittests/DriverTests/DriverTest.h
>>
>> Modified: lld/trunk/unittests/DriverTests/DriverTest.h
>> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/DriverTest.h?rev=188988&r1=188987&r2=188988&view=diff
> ==============================================================================
>> --- lld/trunk/unittests/DriverTests/DriverTest.h (original)
>> +++ lld/trunk/unittests/DriverTests/DriverTest.h Thu Aug 22 00:44:08 2013
>> @@ -38,6 +38,7 @@ protected:
>>       if (inputElement.kind() == InputElement::Kind::File)
>>         return
> (llvm::dyn_cast<FileNode>(&inputElement))->path(*linkingContext());
>>       assert(0 && "not handling other types of input files");
>> +    return "";
> Llvm convention is to use llvm_unreachable rather than assert(0), in this
> way you won't need that dead return statement either.
>
>>     }
>>
>>     // For unit tests to call driver with various command lines.
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation




More information about the llvm-commits mailing list