From 7a739a0dfb6d408c6d587e5c7b52abd89fc3fdd3 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Sat, 19 Jan 2019 10:56:40 +0000 Subject: Update more file headers across all of the LLVM projects in the monorepo to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@351648 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/builtins/subvti3.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/builtins/subvti3.c') diff --git a/lib/builtins/subvti3.c b/lib/builtins/subvti3.c index a6804d2d7..661364d75 100644 --- a/lib/builtins/subvti3.c +++ b/lib/builtins/subvti3.c @@ -1,9 +1,8 @@ /* ===-- subvti3.c - Implement __subvti3 -----------------------------------=== * - * The LLVM Compiler Infrastructure - * - * This file is dual licensed under the MIT and the University of Illinois Open - * Source Licenses. See LICENSE.TXT for details. + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * * ===----------------------------------------------------------------------=== * -- cgit v1.2.1 From db42a0ccf35e49df3a801d4a7964fce06f587542 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Sun, 28 Apr 2019 21:53:32 +0000 Subject: [builtins] Reformat builtins with clang-format Update formatting to use the LLVM style. This is part of the cleanup proposed in "[RFC] compiler-rt builtins cleanup and refactoring". Differential Revision: https://reviews.llvm.org/D60351 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@359410 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/builtins/subvti3.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'lib/builtins/subvti3.c') diff --git a/lib/builtins/subvti3.c b/lib/builtins/subvti3.c index 661364d75..9d554c1db 100644 --- a/lib/builtins/subvti3.c +++ b/lib/builtins/subvti3.c @@ -19,21 +19,16 @@ /* Effects: aborts if a - b overflows */ -COMPILER_RT_ABI ti_int -__subvti3(ti_int a, ti_int b) -{ - ti_int s = (tu_int) a - (tu_int) b; - if (b >= 0) - { - if (s > a) - compilerrt_abort(); - } - else - { - if (s <= a) - compilerrt_abort(); - } - return s; +COMPILER_RT_ABI ti_int __subvti3(ti_int a, ti_int b) { + ti_int s = (tu_int)a - (tu_int)b; + if (b >= 0) { + if (s > a) + compilerrt_abort(); + } else { + if (s <= a) + compilerrt_abort(); + } + return s; } #endif /* CRT_HAS_128BIT */ -- cgit v1.2.1 From f0745e8476f069296a7c71accedd061dce4cdf79 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Sun, 28 Apr 2019 22:47:49 +0000 Subject: [builtins] Use single line C++/C99 comment style Use the uniform single line C++/99 style for code comments. This is part of the cleanup proposed in "[RFC] compiler-rt builtins cleanup and refactoring". Differential Revision: https://reviews.llvm.org/D60352 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@359411 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/builtins/subvti3.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'lib/builtins/subvti3.c') diff --git a/lib/builtins/subvti3.c b/lib/builtins/subvti3.c index 9d554c1db..91ac18834 100644 --- a/lib/builtins/subvti3.c +++ b/lib/builtins/subvti3.c @@ -1,23 +1,22 @@ -/* ===-- subvti3.c - Implement __subvti3 -----------------------------------=== - * - * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. - * See https://llvm.org/LICENSE.txt for license information. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - * - * ===----------------------------------------------------------------------=== - * - * This file implements __subvti3 for the compiler_rt library. - * - * ===----------------------------------------------------------------------=== - */ +//===-- subvti3.c - Implement __subvti3 -----------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file implements __subvti3 for the compiler_rt library. +// +//===----------------------------------------------------------------------===// #include "int_lib.h" #ifdef CRT_HAS_128BIT -/* Returns: a - b */ +// Returns: a - b -/* Effects: aborts if a - b overflows */ +// Effects: aborts if a - b overflows COMPILER_RT_ABI ti_int __subvti3(ti_int a, ti_int b) { ti_int s = (tu_int)a - (tu_int)b; @@ -31,4 +30,4 @@ COMPILER_RT_ABI ti_int __subvti3(ti_int a, ti_int b) { return s; } -#endif /* CRT_HAS_128BIT */ +#endif // CRT_HAS_128BIT -- cgit v1.2.1