//===--- ExprConstShared.h - Shared consetxpr functionality ----*- 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 // //===----------------------------------------------------------------------===// // // Shared functionality between the new constant expression // interpreter (AST/ByteCode/) and the current one (ExprConstant.cpp). // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_LIB_AST_EXPRCONSTSHARED_H #define LLVM_CLANG_LIB_AST_EXPRCONSTSHARED_H namespace llvm { class APFloat; } namespace clang { class QualType; class LangOptions; } // namespace clang usingnamespaceclang; /// Values returned by __builtin_classify_type, chosen to match the values /// produced by GCC's builtin. enum class GCCTypeClass { … }; GCCTypeClass EvaluateBuiltinClassifyType(QualType T, const LangOptions &LangOpts); void HandleComplexComplexMul(llvm::APFloat A, llvm::APFloat B, llvm::APFloat C, llvm::APFloat D, llvm::APFloat &ResR, llvm::APFloat &ResI); void HandleComplexComplexDiv(llvm::APFloat A, llvm::APFloat B, llvm::APFloat C, llvm::APFloat D, llvm::APFloat &ResR, llvm::APFloat &ResI); #endif