clang
18.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 "
FunctionPointer.h
"
13
#include "
Pointer.h
"
14
15
using namespace
clang
;
16
using namespace
clang::interp
;
17
18
namespace
clang
{
19
namespace
interp {
20
21
size_t
primSize
(
PrimType
Type
) {
22
TYPE_SWITCH
(
Type
,
return
sizeof
(T));
23
llvm_unreachable(
"not a primitive type"
);
24
}
25
26
}
// namespace interp
27
}
// namespace clang
Boolean.h
Floating.h
FunctionPointer.h
Pointer.h
PrimType.h
TYPE_SWITCH
#define TYPE_SWITCH(Expr, B)
Definition:
PrimType.h:100
clang::Type
The base class of the type hierarchy.
Definition:
Type.h:1597
clang::interp
Definition:
ASTContext.h:128
clang::interp::PrimType
PrimType
Enumeration of the primitive types of the VM.
Definition:
PrimType.h:31
clang::interp::primSize
size_t primSize(PrimType Type)
Returns the size of a primitive type in bytes.
Definition:
PrimType.cpp:21
clang
Definition:
CalledOnceCheck.h:17
Generated on Tue Sep 26 2023 00:46:30 for clang by
1.9.6