clang 17.0.0git
Go to the documentation of this file.
1//===--- ByteCodeExprGen.h - Code generator for expressions -----*- C++ -*-===//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
9// Defines the constexpr bytecode compiler.
16#include "ByteCodeEmitter.h"
17#include "EvalEmitter.h"
18#include "Pointer.h"
19#include "PrimType.h"
20#include "Record.h"
21#include "clang/AST/Decl.h"
22#include "clang/AST/Expr.h"
26namespace clang {
27class QualType;
29namespace interp {
31template <class Emitter> class LocalScope;
32template <class Emitter> class DestructorScope;
33template <class Emitter> class RecordScope;
34template <class Emitter> class VariableScope;
35template <class Emitter> class DeclScope;
36template <class Emitter> class OptionScope;
37template <class Emitter> class ArrayIndexScope;
39/// Compilation context for expressions.
40template <class Emitter>
41class ByteCodeExprGen : public ConstStmtVisitor<ByteCodeExprGen<Emitter>, bool>,
42 public Emitter {
44 // Aliases for types defined in the emitter.
45 using LabelTy = typename Emitter::LabelTy;
46 using AddrTy = typename Emitter::AddrTy;
48 /// Current compilation context.
50 /// Program to link to.
54 /// Initializes the compiler and the backend emitter.
55 template <typename... Tys>
56 ByteCodeExprGen(Context &Ctx, Program &P, Tys &&... Args)
57 : Emitter(Ctx, P, Args...), Ctx(Ctx), P(P) {}
59 // Expression visitors - result returned on interp stack.
60 bool VisitCastExpr(const CastExpr *E);
63 bool VisitParenExpr(const ParenExpr *E);
65 bool VisitLogicalBinOp(const BinaryOperator *E);
68 bool VisitCallExpr(const CallExpr *E);
69 bool VisitBuiltinCallExpr(const CallExpr *E);
74 bool VisitCXXThisExpr(const CXXThisExpr *E);
75 bool VisitUnaryOperator(const UnaryOperator *E);
76 bool VisitDeclRefExpr(const DeclRefExpr *E);
80 bool VisitInitListExpr(const InitListExpr *E);
81 bool VisitConstantExpr(const ConstantExpr *E);
83 bool VisitMemberExpr(const MemberExpr *E);
87 bool VisitStringLiteral(const StringLiteral *E);
95 bool VisitTypeTraitExpr(const TypeTraitExpr *E);
98 bool visitExpr(const Expr *E) override;
99 bool visitDecl(const VarDecl *VD) override;
102 /// Emits scope cleanup instructions.
103 void emitCleanup();
105 /// Returns a record type from a record or pointer type.
108 /// Returns a record from a record or pointer type.
110 Record *getRecord(const RecordDecl *RD);
112 // Returns a function for the given FunctionDecl.
113 // If the function does not exist yet, it is compiled.
114 const Function *getFunction(const FunctionDecl *FD);
116 /// Classifies a type.
117 std::optional<PrimType> classify(const Expr *E) const {
118 return E->isGLValue() ? PT_Ptr : classify(E->getType());
119 }
120 std::optional<PrimType> classify(QualType Ty) const {
121 return Ctx.classify(Ty);
122 }
124 /// Classifies a known primitive type
126 if (auto T = classify(Ty)) {
127 return *T;
128 }
129 llvm_unreachable("not a primitive type");
130 }
132 /// Evaluates an expression for side effects and discards the result.
133 bool discard(const Expr *E);
134 /// Evaluates an expression and places result on stack.
135 bool visit(const Expr *E);
136 /// Compiles an initializer.
137 bool visitInitializer(const Expr *E);
138 /// Compiles an array initializer.
140 /// Compiles a record initializer.
142 /// Creates and initializes a variable from the given decl.
143 bool visitVarDecl(const VarDecl *VD);
145 /// Visits an expression and converts it to a boolean.
146 bool visitBool(const Expr *E);
148 /// Visits an initializer for a local.
149 bool visitLocalInitializer(const Expr *Init, unsigned I) {
150 if (!this->emitGetPtrLocal(I, Init))
151 return false;
153 if (!visitInitializer(Init))
154 return false;
156 return this->emitPopPtr(Init);
157 }
159 /// Visits an initializer for a global.
160 bool visitGlobalInitializer(const Expr *Init, unsigned I) {
161 if (!this->emitGetPtrGlobal(I, Init))
162 return false;
164 if (!visitInitializer(Init))
165 return false;
167 if (Init->getType()->isRecordType() && !this->emitCheckGlobalCtor(Init))
168 return false;
170 return this->emitPopPtr(Init);
171 }
173 /// Visits a delegated initializer.
174 bool visitThisInitializer(const Expr *I) {
175 if (!this->emitThis(I))
176 return false;
178 if (!visitInitializer(I))
179 return false;
181 return this->emitPopPtr(I);
182 }
185 llvm::function_ref<bool(const Expr *)> V);
187 /// Creates a local primitive value.
188 unsigned allocateLocalPrimitive(DeclTy &&Decl, PrimType Ty, bool IsConst,
189 bool IsExtended = false);
191 /// Allocates a space storing a local given its type.
192 std::optional<unsigned> allocateLocal(DeclTy &&Decl, bool IsExtended = false);
195 friend class VariableScope<Emitter>;
196 friend class LocalScope<Emitter>;
197 friend class DestructorScope<Emitter>;
198 friend class RecordScope<Emitter>;
199 friend class DeclScope<Emitter>;
200 friend class OptionScope<Emitter>;
201 friend class ArrayIndexScope<Emitter>;
203 /// Emits a zero initializer.
204 bool visitZeroInitializer(QualType QT, const Expr *E);
206 enum class DerefKind {
207 /// Value is read and pushed to stack.
208 Read,
209 /// Direct method generates a value which is written. Returns pointer.
210 Write,
211 /// Direct method receives the value, pushes mutated value. Returns pointer.
212 ReadWrite,
213 };
215 /// Method to directly load a value. If the value can be fetched directly,
216 /// the direct handler is called. Otherwise, a pointer is left on the stack
217 /// and the indirect handler is expected to operate on that.
218 bool dereference(const Expr *LV, DerefKind AK,
219 llvm::function_ref<bool(PrimType)> Direct,
220 llvm::function_ref<bool(PrimType)> Indirect);
221 bool dereferenceParam(const Expr *LV, PrimType T, const ParmVarDecl *PD,
222 DerefKind AK,
223 llvm::function_ref<bool(PrimType)> Direct,
224 llvm::function_ref<bool(PrimType)> Indirect);
225 bool dereferenceVar(const Expr *LV, PrimType T, const VarDecl *PD,
226 DerefKind AK, llvm::function_ref<bool(PrimType)> Direct,
227 llvm::function_ref<bool(PrimType)> Indirect);
229 /// Emits an APSInt constant.
230 bool emitConst(const llvm::APSInt &Value, const Expr *E);
231 bool emitConst(const llvm::APInt &Value, const Expr *E) {
232 return emitConst(static_cast<llvm::APSInt>(Value), E);
233 }
235 /// Emits an integer constant.
236 template <typename T> bool emitConst(T Value, const Expr *E);
238 /// Returns the CXXRecordDecl for the type of the given expression,
239 /// or nullptr if no such decl exists.
240 const CXXRecordDecl *getRecordDecl(const Expr *E) const {
241 QualType T = E->getType();
242 if (const auto *RD = T->getPointeeCXXRecordDecl())
243 return RD;
244 return T->getAsCXXRecordDecl();
245 }
247 /// Returns whether we should create a global variable for the
248 /// given ValueDecl.
249 bool shouldBeGloballyIndexed(const ValueDecl *VD) const {
250 if (const auto *V = dyn_cast<VarDecl>(VD))
251 return V->hasGlobalStorage() || V->isConstexpr();
253 return false;
254 }
256 llvm::RoundingMode getRoundingMode(const Expr *E) const {
257 FPOptions FPO = E->getFPFeaturesInEffect(Ctx.getLangOpts());
259 if (FPO.getRoundingMode() == llvm::RoundingMode::Dynamic)
260 return llvm::RoundingMode::NearestTiesToEven;
262 return FPO.getRoundingMode();
263 }
265 bool emitRecordDestruction(const Descriptor *Desc);
266 bool emitDerivedToBaseCasts(const RecordType *DerivedType,
267 const RecordType *BaseType, const Expr *E);
270 /// Variable to storage mapping.
271 llvm::DenseMap<const ValueDecl *, Scope::Local> Locals;
273 /// OpaqueValueExpr to location mapping.
274 llvm::DenseMap<const OpaqueValueExpr *, unsigned> OpaqueExprs;
276 /// Current scope.
279 /// Current argument index. Needed to emit ArrayInitIndexExpr.
280 std::optional<uint64_t> ArrayIndex;
282 /// Flag indicating if return value is to be discarded.
283 bool DiscardResult = false;
286extern template class ByteCodeExprGen<ByteCodeEmitter>;
287extern template class ByteCodeExprGen<EvalEmitter>;
289/// Scope chain managing the variable lifetimes.
290template <class Emitter> class VariableScope {
293 : Ctx(Ctx), Parent(Ctx->VarScope) {
294 Ctx->VarScope = this;
295 }
297 virtual ~VariableScope() { Ctx->VarScope = this->Parent; }
299 void add(const Scope::Local &Local, bool IsExtended) {
300 if (IsExtended)
301 this->addExtended(Local);
302 else
303 this->addLocal(Local);
304 }
306 virtual void addLocal(const Scope::Local &Local) {
307 if (this->Parent)
308 this->Parent->addLocal(Local);
309 }
311 virtual void addExtended(const Scope::Local &Local) {
312 if (this->Parent)
313 this->Parent->addExtended(Local);
314 }
316 virtual void emitDestruction() {}
317 virtual void emitDestructors() {}
318 VariableScope *getParent() const { return Parent; }
321 /// ByteCodeExprGen instance.
323 /// Link to the parent scope.
327/// Generic scope for local variables.
328template <class Emitter> class LocalScope : public VariableScope<Emitter> {
332 /// Emit a Destroy op for this scope.
333 ~LocalScope() override {
334 if (!Idx)
335 return;
336 this->Ctx->emitDestroy(*Idx, SourceInfo{});
337 }
339 /// Overriden to support explicit destruction.
340 void emitDestruction() override {
341 if (!Idx)
342 return;
343 this->emitDestructors();
344 this->Ctx->emitDestroy(*Idx, SourceInfo{});
345 this->Idx = std::nullopt;
346 }
348 void addLocal(const Scope::Local &Local) override {
349 if (!Idx) {
350 Idx = this->Ctx->Descriptors.size();
351 this->Ctx->Descriptors.emplace_back();
352 }
354 this->Ctx->Descriptors[*Idx].emplace_back(Local);
355 }
357 void emitDestructors() override {
358 if (!Idx)
359 return;
360 // Emit destructor calls for local variables of record
361 // type with a destructor.
362 for (Scope::Local &Local : this->Ctx->Descriptors[*Idx]) {
363 if (!Local.Desc->isPrimitive() && !Local.Desc->isPrimitiveArray()) {
364 this->Ctx->emitGetPtrLocal(Local.Offset, SourceInfo{});
365 this->Ctx->emitRecordDestruction(Local.Desc);
366 }
367 }
368 }
370 /// Index of the scope in the chain.
371 std::optional<unsigned> Idx;
374/// Emits the destructors of the variables of \param OtherScope
375/// when this scope is destroyed. Does not create a Scope in the bytecode at
376/// all, this is just a RAII object to emit destructors.
377template <class Emitter> class DestructorScope final {
379 DestructorScope(LocalScope<Emitter> &OtherScope) : OtherScope(OtherScope) {}
381 ~DestructorScope() { OtherScope.emitDestructors(); }
384 LocalScope<Emitter> &OtherScope;
387/// Like a regular LocalScope, except that the destructors of all local
388/// variables are automatically emitted when the AutoScope is destroyed.
389template <class Emitter> class AutoScope : public LocalScope<Emitter> {
392 : LocalScope<Emitter>(Ctx), DS(*this) {}
398/// Scope for storage declared in a compound statement.
399template <class Emitter> class BlockScope final : public AutoScope<Emitter> {
403 void addExtended(const Scope::Local &Local) override {
404 // If we to this point, just add the variable as a normal local
405 // variable. It will be destroyed at the end of the block just
406 // like all others.
407 this->addLocal(Local);
408 }
411/// Expression scope which tracks potentially lifetime extended
412/// temporaries which are hoisted to the parent scope on exit.
413template <class Emitter> class ExprScope final : public AutoScope<Emitter> {
417 void addExtended(const Scope::Local &Local) override {
418 if (this->Parent)
419 this->Parent->addLocal(Local);
420 }
423template <class Emitter> class ArrayIndexScope final {
425 ArrayIndexScope(ByteCodeExprGen<Emitter> *Ctx, uint64_t Index) : Ctx(Ctx) {
426 OldArrayIndex = Ctx->ArrayIndex;
427 Ctx->ArrayIndex = Index;
428 }
430 ~ArrayIndexScope() { Ctx->ArrayIndex = OldArrayIndex; }
434 std::optional<uint64_t> OldArrayIndex;
437} // namespace interp
438} // namespace clang
#define V(N, I)
Definition: ASTContext.h:3230
NodeId Parent
Definition: ASTDiff.cpp:191
@ Write
Definition: CGBuiltin.cpp:7715
static std::optional< DereferenceInfo > dereference(ProgramStateRef State, const FieldRegion *FR)
Dereferences FR and returns with the pointee's region, and whether it needs to be casted back to it's...
AbstractConditionalOperator - An abstract base class for ConditionalOperator and BinaryConditionalOpe...
Definition: Expr.h:4120
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
Definition: Expr.h:5531
ArraySubscriptExpr - [C99] Array Subscripting.
Definition: Expr.h:2661
A builtin binary operation expression such as "x + y" or "x <= y".
Definition: Expr.h:3819
A boolean literal, per ([C++ lex.bool] Boolean literals).
Definition: ExprCXX.h:720
A default argument (C++ [dcl.fct.default]).
Definition: ExprCXX.h:1249
A use of a default initializer in a constructor or in aggregate initialization.
Definition: ExprCXX.h:1356
Represents a call to a member function that may be written either with member call syntax (e....
Definition: ExprCXX.h:176
The null pointer literal (C++11 [lex.nullptr])
Definition: ExprCXX.h:765
Represents a C++ struct/union/class.
Definition: DeclCXX.h:254
Represents the this expression in C++.
Definition: ExprCXX.h:1148
CallExpr - Represents a function call (C99, C++ []).
Definition: Expr.h:2817
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:3487
CompoundAssignOperator - For compound assignments (e.g.
Definition: Expr.h:4067
CompoundLiteralExpr - [C99].
Definition: Expr.h:3417
ConstStmtVisitor - This class implements a simple visitor for Stmt subclasses.
Definition: StmtVisitor.h:194
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
Definition: Expr.h:1044
A reference to a declared variable, function, enum, etc.
Definition: Expr.h:1237
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:83
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
Definition: ExprCXX.h:3420
This represents one expression.
Definition: Expr.h:110
bool isGLValue() const
Definition: Expr.h:274
QualType getType() const
Definition: Expr.h:142
Represents a function declaration or definition.
Definition: Decl.h:1917
Represents an implicitly-generated value initialization of an object of a given type.
Definition: Expr.h:5567
Describes an C or C++ initializer list.
Definition: Expr.h:4815
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
Definition: ExprCXX.h:4564
MemberExpr - [C99] Structure and Union Members.
Definition: Expr.h:3180
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class.
Definition: Expr.h:1145
ParenExpr - This represents a parethesized expression, e.g.
Definition: Expr.h:2128
Represents a parameter to a function.
Definition: Decl.h:1722
A (possibly-)qualified type.
Definition: Type.h:736
Represents a struct/union/class.
Definition: Decl.h:4012
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
Definition: Type.h:4850
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1780
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Definition: ExprCXX.h:4320
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
Definition: ExprCXX.h:2742
CXXRecordDecl * getAsCXXRecordDecl() const
Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or beca...
Definition: Type.cpp:1799
const CXXRecordDecl * getPointeeCXXRecordDecl() const
If this is a pointer or reference to a RecordType, return the CXXRecordDecl that the type refers to.
Definition: Type.cpp:1784
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand.
Definition: Expr.h:2565
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
Definition: Expr.h:2181
Represents a variable declaration or definition.
Definition: Decl.h:913
ArrayIndexScope(ByteCodeExprGen< Emitter > *Ctx, uint64_t Index)
Like a regular LocalScope, except that the destructors of all local variables are automatically emitt...
AutoScope(ByteCodeExprGen< Emitter > *Ctx)
Scope for storage declared in a compound statement.
BlockScope(ByteCodeExprGen< Emitter > *Ctx)
void addExtended(const Scope::Local &Local) override
Compilation context for expressions.
bool visitExpr(const Expr *E) override
std::optional< unsigned > allocateLocal(DeclTy &&Decl, bool IsExtended=false)
Allocates a space storing a local given its type.
unsigned allocateLocalPrimitive(DeclTy &&Decl, PrimType Ty, bool IsConst, bool IsExtended=false)
Creates a local primitive value.
bool VisitIntegerLiteral(const IntegerLiteral *E)
bool VisitCharacterLiteral(const CharacterLiteral *E)
bool VisitDeclRefExpr(const DeclRefExpr *E)
bool VisitExprWithCleanups(const ExprWithCleanups *E)
bool VisitMemberExpr(const MemberExpr *E)
bool discard(const Expr *E)
Evaluates an expression for side effects and discards the result.
bool visitThisInitializer(const Expr *I)
Visits a delegated initializer.
bool visitDecl(const VarDecl *VD) override
Toplevel visitDecl().
bool visitInitializer(const Expr *E)
Compiles an initializer.
bool visitRecordInitializer(const Expr *Initializer)
Compiles a record initializer.
bool VisitParenExpr(const ParenExpr *E)
bool VisitCXXDefaultArgExpr(const CXXDefaultArgExpr *E)
bool VisitCXXDefaultInitExpr(const CXXDefaultInitExpr *E)
bool VisitCompoundLiteralExpr(const CompoundLiteralExpr *E)
bool VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *E)
Program & P
Program to link to.
bool VisitBuiltinCallExpr(const CallExpr *E)
PrimType classifyPrim(QualType Ty) const
Classifies a known primitive type.
bool VisitCXXMemberCallExpr(const CXXMemberCallExpr *E)
llvm::DenseMap< const ValueDecl *, Scope::Local > Locals
Variable to storage mapping.
void emitCleanup()
Emits scope cleanup instructions.
bool VisitCXXNullPtrLiteralExpr(const CXXNullPtrLiteralExpr *E)
bool VisitImplicitValueInitExpr(const ImplicitValueInitExpr *E)
Context & Ctx
Current compilation context.
bool visitGlobalInitializer(const Expr *Init, unsigned I)
Visits an initializer for a global.
bool visitBool(const Expr *E)
Visits an expression and converts it to a boolean.
VariableScope< Emitter > * VarScope
Current scope.
std::optional< PrimType > classify(QualType Ty) const
bool VisitBinaryOperator(const BinaryOperator *E)
bool VisitTypeTraitExpr(const TypeTraitExpr *E)
bool visit(const Expr *E)
Evaluates an expression and places result on stack.
bool VisitInitListExpr(const InitListExpr *E)
bool VisitFloatingLiteral(const FloatingLiteral *E)
bool VisitAbstractConditionalOperator(const AbstractConditionalOperator *E)
bool VisitUnaryOperator(const UnaryOperator *E)
bool VisitArrayInitIndexExpr(const ArrayInitIndexExpr *E)
std::optional< uint64_t > ArrayIndex
Current argument index. Needed to emit ArrayInitIndexExpr.
bool VisitPointerCompoundAssignOperator(const CompoundAssignOperator *E)
bool VisitFloatCompoundAssignOperator(const CompoundAssignOperator *E)
std::optional< PrimType > classify(const Expr *E) const
Classifies a type.
bool DiscardResult
Flag indicating if return value is to be discarded.
bool VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *E)
bool VisitArraySubscriptExpr(const ArraySubscriptExpr *E)
const Function * getFunction(const FunctionDecl *FD)
bool visitLocalInitializer(const Expr *Init, unsigned I)
Visits an initializer for a local.
bool VisitLogicalBinOp(const BinaryOperator *E)
bool visitVarDecl(const VarDecl *VD)
Creates and initializes a variable from the given decl.
bool VisitStringLiteral(const StringLiteral *E)
ByteCodeExprGen(Context &Ctx, Program &P, Tys &&... Args)
Initializes the compiler and the backend emitter.
Record * getRecord(QualType Ty)
Returns a record from a record or pointer type.
llvm::DenseMap< const OpaqueValueExpr *, unsigned > OpaqueExprs
OpaqueValueExpr to location mapping.
bool VisitOpaqueValueExpr(const OpaqueValueExpr *E)
bool VisitCXXThisExpr(const CXXThisExpr *E)
typename Emitter::LabelTy LabelTy
bool VisitPointerArithBinOp(const BinaryOperator *E)
Perform addition/subtraction of a pointer and an integer or subtraction of two pointers.
bool VisitSubstNonTypeTemplateParmExpr(const SubstNonTypeTemplateParmExpr *E)
bool visitConditional(const AbstractConditionalOperator *E, llvm::function_ref< bool(const Expr *)> V)
Visit a conditional operator, i.e.
bool VisitCompoundAssignOperator(const CompoundAssignOperator *E)
bool VisitCallExpr(const CallExpr *E)
const RecordType * getRecordTy(QualType Ty)
Returns a record type from a record or pointer type.
bool VisitConstantExpr(const ConstantExpr *E)
bool VisitCastExpr(const CastExpr *E)
bool VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *E)
bool visitArrayInitializer(const Expr *Initializer)
Compiles an array initializer.
typename Emitter::AddrTy AddrTy
Holds all information required to evaluate constexpr code in a module.
Definition: Context.h:35
const LangOptions & getLangOpts() const
Returns the language options.
Definition: Context.cpp:78
std::optional< PrimType > classify(QualType T) const
Classifies an expression.
Definition: Context.cpp:80
Scope used to handle temporaries in toplevel variable declarations.
Emits the destructors of the variables of.
DestructorScope(LocalScope< Emitter > &OtherScope)
Expression scope which tracks potentially lifetime extended temporaries which are hoisted to the pare...
void addExtended(const Scope::Local &Local) override
ExprScope(ByteCodeExprGen< Emitter > *Ctx)
Bytecode function.
Definition: Function.h:74
Generic scope for local variables.
~LocalScope() override
Emit a Destroy op for this scope.
void emitDestruction() override
Overriden to support explicit destruction.
void emitDestructors() override
void addLocal(const Scope::Local &Local) override
std::optional< unsigned > Idx
Index of the scope in the chain.
LocalScope(ByteCodeExprGen< Emitter > *Ctx)
Scope used to handle initialization methods.
The program contains and links the bytecode for all functions.
Definition: Program.h:40
Structure/Class descriptor.
Definition: Record.h:25
Describes the statement/declaration an opcode was generated from.
Definition: Source.h:70
Scope chain managing the variable lifetimes.
virtual void addExtended(const Scope::Local &Local)
void add(const Scope::Local &Local, bool IsExtended)
VariableScope * Parent
Link to the parent scope.
virtual void addLocal(const Scope::Local &Local)
VariableScope(ByteCodeExprGen< Emitter > *Ctx)
VariableScope * getParent() const
ByteCodeExprGen< Emitter > * Ctx
ByteCodeExprGen instance.
Defines the clang::TargetInfo interface.
Enumeration of the primitive types of the VM.
Definition: PrimType.h:30
llvm::PointerUnion< const Decl *, const Expr * > DeclTy
Definition: Descriptor.h:26
Information about a local's storage.
Definition: Function.h:35