clang  10.0.0svn
PrimType.cpp
Go to the documentation of this file.
1 //===--- Type.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 
11 using namespace clang;
12 using namespace clang::interp;
13 
14 namespace clang {
15 namespace interp {
16 
18  TYPE_SWITCH(Type, return sizeof(T));
19  llvm_unreachable("not a primitive type");
20 }
21 
22 } // namespace interp
23 } // namespace clang
size_t primSize(PrimType Type)
Returns the size of a primitive type in bytes.
Definition: PrimType.cpp:17
The base class of the type hierarchy.
Definition: Type.h:1436
PrimType
Enumeration of the primitive types of the VM.
Definition: PrimType.h:27
Dataflow Directional Tag Classes.
#define TYPE_SWITCH(Expr, B)
Definition: PrimType.h:85