aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/Compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/ByteCode/Compiler.h')
-rw-r--r--clang/lib/AST/ByteCode/Compiler.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/clang/lib/AST/ByteCode/Compiler.h b/clang/lib/AST/ByteCode/Compiler.h
index debee672..3a26342 100644
--- a/clang/lib/AST/ByteCode/Compiler.h
+++ b/clang/lib/AST/ByteCode/Compiler.h
@@ -254,12 +254,8 @@ protected:
/// If the function does not exist yet, it is compiled.
const Function *getFunction(const FunctionDecl *FD);
- std::optional<PrimType> classify(const Expr *E) const {
- return Ctx.classify(E);
- }
- std::optional<PrimType> classify(QualType Ty) const {
- return Ctx.classify(Ty);
- }
+ OptPrimType classify(const Expr *E) const { return Ctx.classify(E); }
+ OptPrimType classify(QualType Ty) const { return Ctx.classify(Ty); }
/// Classifies a known primitive type.
PrimType classifyPrim(QualType Ty) const {
@@ -306,7 +302,7 @@ protected:
bool visitInitList(ArrayRef<const Expr *> Inits, const Expr *ArrayFiller,
const Expr *E);
bool visitArrayElemInit(unsigned ElemIndex, const Expr *Init,
- std::optional<PrimType> InitT);
+ OptPrimType InitT);
bool visitCallArgs(ArrayRef<const Expr *> Args, const FunctionDecl *FuncDecl,
bool Activate);
@@ -405,6 +401,8 @@ private:
bool checkLiteralType(const Expr *E);
bool maybeEmitDeferredVarInit(const VarDecl *VD);
+ bool refersToUnion(const Expr *E);
+
protected:
/// Variable to storage mapping.
llvm::DenseMap<const ValueDecl *, Scope::Local> Locals;
@@ -435,7 +433,7 @@ protected:
bool InitStackActive = false;
/// Type of the expression returned by the function.
- std::optional<PrimType> ReturnType;
+ OptPrimType ReturnType;
/// Switch case mapping.
CaseMap CaseLabels;