clang
17.0.0git
lib
AST
Interp
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 "
Floating.h
"
12
#include "
Pointer.h
"
13
14
using namespace
clang
;
15
using namespace
clang::interp
;
16
17
namespace
clang
{
18
namespace
interp {
19
20
size_t
primSize
(
PrimType
Type
) {
21
TYPE_SWITCH
(
Type
,
return
sizeof
(T));
22
llvm_unreachable(
"not a primitive type"
);
23
}
24
25
}
// namespace interp
26
}
// namespace clang
Boolean.h
Floating.h
Pointer.h
PrimType.h
TYPE_SWITCH
#define TYPE_SWITCH(Expr, B)
Definition:
PrimType.h:79
clang::Type
The base class of the type hierarchy.
Definition:
Type.h:1566
clang::interp
Definition:
ASTContext.h:128
clang::interp::PrimType
PrimType
Enumeration of the primitive types of the VM.
Definition:
PrimType.h:29
clang::interp::primSize
size_t primSize(PrimType Type)
Returns the size of a primitive type in bytes.
Definition:
PrimType.cpp:20
clang
Definition:
CalledOnceCheck.h:17
Generated on Sun Feb 5 2023 22:11:19 for clang by
1.9.6