[llvm] r260470 - [llvm-nm] Minor style change. Prefer EXIT_SUCCESS over 0.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 10 16:11:56 PST 2016
I doubt we're terribly consistent about that (I see 7 cases of "return
EXIT_SUCCESS" across all of llvm/clang - I imagine we have many more main
functions than that...
Also, in C++ you can just omit it entirely and let main return - it's
implicitly return 0.
On Wed, Feb 10, 2016 at 3:56 PM, Davide Italiano via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: davide
> Date: Wed Feb 10 17:56:18 2016
> New Revision: 260470
>
> URL: http://llvm.org/viewvc/llvm-project?rev=260470&view=rev
> Log:
> [llvm-nm] Minor style change. Prefer EXIT_SUCCESS over 0.
>
> Modified:
> llvm/trunk/tools/llvm-nm/llvm-nm.cpp
>
> Modified: llvm/trunk/tools/llvm-nm/llvm-nm.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-nm/llvm-nm.cpp?rev=260470&r1=260469&r2=260470&view=diff
>
> ==============================================================================
> --- llvm/trunk/tools/llvm-nm/llvm-nm.cpp (original)
> +++ llvm/trunk/tools/llvm-nm/llvm-nm.cpp Wed Feb 10 17:56:18 2016
> @@ -1312,5 +1312,5 @@ int main(int argc, char **argv) {
> if (HadError)
> return 1;
>
> - return 0;
> + return EXIT_SUCCESS;
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160210/9f1503e9/attachment-0001.html>
More information about the llvm-commits
mailing list