Home | History | Annotate | Line # | Download | only in Basic
      1 //===- ExpressionTraits.h - C++ Expression Traits Support Enums -*- C++ -*-===//
      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 /// \file
     10 /// Defines enumerations for expression traits intrinsics.
     11 ///
     12 //===----------------------------------------------------------------------===//
     13 
     14 #ifndef LLVM_CLANG_BASIC_EXPRESSIONTRAITS_H
     15 #define LLVM_CLANG_BASIC_EXPRESSIONTRAITS_H
     16 
     17 #include "llvm/Support/Compiler.h"
     18 
     19 namespace clang {
     20 
     21 enum ExpressionTrait {
     22 #define EXPRESSION_TRAIT(Spelling, Name, Key) ET_##Name,
     23 #include "clang/Basic/TokenKinds.def"
     24   ET_Last = -1 // ET_Last == last ET_XX in the enum.
     25 #define EXPRESSION_TRAIT(Spelling, Name, Key) +1
     26 #include "clang/Basic/TokenKinds.def"
     27 };
     28 
     29 /// Return the internal name of type trait \p T. Never null.
     30 const char *getTraitName(ExpressionTrait T) LLVM_READONLY;
     31 
     32 /// Return the spelling of the type trait \p TT. Never null.
     33 const char *getTraitSpelling(ExpressionTrait T) LLVM_READONLY;
     34 
     35 } // namespace clang
     36 
     37 #endif
     38