[PATCH] D31787: [TLI] Add declarations for various math header file routines from math-finite.h that create '__<func>_finite as functions
Chris Chrulski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 2 08:10:56 PDT 2017
chrischr added inline comments.
================
Comment at: include/llvm/Analysis/TargetLibraryInfo.def:165
+/// double __acos_finite(double x);
+TLI_DEFINE_ENUM_INTERNAL(acos_finite)
+TLI_DEFINE_STRING_INTERNAL("__acos_finite")
----------------
andrew.w.kaylor wrote:
> Is there a reason for these being inserted where they are? It looks rather arbitrary.
The list needs to be created in sorted order based on the value of the string definition.
```
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T,
ArrayRef<StringRef> StandardNames) {
// Verify that the StandardNames array is in alphabetical order.
assert(std::is_sorted(StandardNames.begin(), StandardNames.end(),
[](StringRef LHS, StringRef RHS) {
return LHS < RHS;
}) &&
"TargetLibraryInfoImpl function names must be sorted");
```
https://reviews.llvm.org/D31787
More information about the llvm-commits
mailing list