diff options
| author | Cheng Wang <chennngwang@gmail.com> | 2020-12-03 20:17:24 +0800 |
|---|---|---|
| committer | Cheng Wang <chennngwang@gmail.com> | 2020-12-11 09:25:20 +0800 |
| commit | 1fd32dcb294e16781fcfcf1a468180d00cf1e3ca (patch) | |
| tree | 4e430b88e6df710581974f17a84b7cd3f09eeaf3 /libc/src/stdlib/labs.h | |
| parent | e52881a2870234f0dad6e338a0f084eddeaa9356 (diff) | |
[libc] Add [l|ll]abs implementation.
Implement abs, labs and llabs with template.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D92626
Diffstat (limited to 'libc/src/stdlib/labs.h')
| -rw-r--r-- | libc/src/stdlib/labs.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libc/src/stdlib/labs.h b/libc/src/stdlib/labs.h new file mode 100644 index 000000000000..0f0ea99dc22a --- /dev/null +++ b/libc/src/stdlib/labs.h @@ -0,0 +1,18 @@ +//===-- Implementation header for labs --------------------------*- C++ -*-===// +// +// 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 +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_SRC_STDLIB_LABS_H +#define LLVM_LIBC_SRC_STDLIB_LABS_H + +namespace __llvm_libc { + +long labs(long n); + +} // namespace __llvm_libc + +#endif // LLVM_LIBC_SRC_STDLIB_LABS_H |
