This patch applies the lint rules described in the previous patch. There was also a significant amount of effort put into manually fixing things, since all of the templated functions, or structs defined in /spec, were not updated and had to be handled manually. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D114302
21 lines
749 B
C++
21 lines
749 B
C++
//===-- Implementation of lrintf function ---------------------------------===//
|
|
//
|
|
// 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "src/math/lrintf.h"
|
|
#include "src/__support/FPUtil/NearestIntegerOperations.h"
|
|
#include "src/__support/common.h"
|
|
|
|
namespace __llvm_libc {
|
|
|
|
LLVM_LIBC_FUNCTION(long, lrintf, (float x)) {
|
|
return fputil::round_to_signed_integer_using_current_rounding_mode<float,
|
|
long>(x);
|
|
}
|
|
|
|
} // namespace __llvm_libc
|