Lines Matching +full:constant +full:- +full:current

1 //===--- ConstantEmitter.h - IR constant emission ---------------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
31 /// Whether non-abstract components of the emitter have been initialized.
37 /// Whether the constant-emission failed.
40 /// Whether we're in a constant context.
43 /// The AST address space where this (non-abstract) initializer is going.
47 llvm::SmallVector<std::pair<llvm::Constant *, llvm::GlobalVariable*>, 4>
65 /// Is the current emission context abstract?
74 /// constant. If this succeeds, the emission must be finalized.
75 llvm::Constant *tryEmitForInitializer(const VarDecl &D);
76 llvm::Constant *tryEmitForInitializer(const Expr *E, LangAS destAddrSpace,
78 llvm::Constant *emitForInitializer(const APValue &value, LangAS destAddrSpace,
88 // - using the CGF (if present) for anything other than establishing
90 // side-effects must not be emitted as an abstract expression
92 // - doing anything that would not be safe to duplicate within an
95 // reference to its current location.
98 /// constant.
99 llvm::Constant *tryEmitAbstractForInitializer(const VarDecl &D);
101 /// Emit the result of the given expression as an abstract constant,
103 /// expression is known to be a constant expression with either a fairly
105 llvm::Constant *emitAbstract(const Expr *E, QualType T);
106 llvm::Constant *
110 /// Try to emit the result of the given expression as an abstract constant.
111 llvm::Constant *tryEmitAbstract(const Expr *E, QualType T);
112 llvm::Constant *tryEmitAbstractForMemory(const Expr *E, QualType T);
114 llvm::Constant *tryEmitAbstract(const APValue &value, QualType T);
115 llvm::Constant *tryEmitAbstractForMemory(const APValue &value, QualType T);
117 llvm::Constant *tryEmitConstantSignedPointer(llvm::Constant *Ptr,
120 llvm::Constant *tryEmitConstantExpr(const ConstantExpr *CE);
122 llvm::Constant *emitNullForMemory(QualType T) { in emitNullForMemory()
125 llvm::Constant *emitForMemory(llvm::Constant *C, QualType T) { in emitForMemory()
129 static llvm::Constant *emitNullForMemory(CodeGenModule &CGM, QualType T);
130 static llvm::Constant *emitForMemory(CodeGenModule &CGM, llvm::Constant *C,
133 // These are private helper routines of the constant emitter that
137 llvm::Constant *tryEmitPrivateForVarInit(const VarDecl &D);
139 llvm::Constant *tryEmitPrivate(const Expr *E, QualType T);
140 llvm::Constant *tryEmitPrivateForMemory(const Expr *E, QualType T);
142 llvm::Constant *
145 llvm::Constant *tryEmitPrivateForMemory(const APValue &value, QualType T);
147 /// Get the address of the current location. This is a constant
155 /// refers to the current-address value in its own initializer.
161 void registerCurrentAddrPrivate(llvm::Constant *signal,
170 llvm::Constant *markIfFailed(llvm::Constant *init) { in markIfFailed()
185 llvm::Constant *validateAndPopAbstract(llvm::Constant *C, AbstractState save);