1//===--- CallUtils.cpp - Shared call emission queries ---------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "clang/CodeGenUtils/CallUtils.h"
10
11namespace clang::CodeGenUtils {
12
13CanQual<FunctionProtoType> getFormalType(const CXXMethodDecl *MD) {
14 return MD->getType()
15 ->getCanonicalTypeUnqualified()
16 .getAs<FunctionProtoType>();
17}
18
19llvm::FPClassTest getNoFPClassTestMask(const LangOptions &LangOpts) {
20 llvm::FPClassTest Mask = llvm::fcNone;
21 if (LangOpts.NoHonorInfs)
22 Mask |= llvm::fcInf;
23 if (LangOpts.NoHonorNaNs)
24 Mask |= llvm::fcNan;
25 return Mask;
26}
27
28} // namespace clang::CodeGenUtils
29