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

David Blaikie dblaikie at gmail.com
Wed Aug 21 23:58:21 PDT 2013


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130821/5d3a6a56/attachment.html>


More information about the llvm-commits mailing list