clang 24.0.0git
PrimType.cpp
Go to the documentation of this file.
1//===--- PrimType.cpp - Types for the constexpr VM --------------*- 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#include "PrimType.h"
10#include "Boolean.h"
11#include "Char.h"
12#include "FixedPoint.h"
13#include "Floating.h"
14#include "IntegralAP.h"
15#include "MemberPointer.h"
16#include "Pointer.h"
17#include "Reflect.h"
18
19using namespace clang;
20using namespace clang::interp;
21
22namespace clang {
23namespace interp {
24
26 TYPE_SWITCH(Type, return sizeof(T));
27 llvm_unreachable("not a primitive type");
28}
29
30} // namespace interp
31} // namespace clang
#define TYPE_SWITCH(Expr, B)
Definition PrimType.h:240
The base class of the type hierarchy.
Definition TypeBase.h:1879
PrimType
Enumeration of the primitive types of the VM.
Definition PrimType.h:35
size_t primSize(PrimType Type)
Returns the size of a primitive type in bytes.
Definition PrimType.cpp:25
Top level wrappers for InstallAPI frontend operations.
const FunctionProtoType * T