aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/Compiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/ByteCode/Compiler.cpp')
-rw-r--r--clang/lib/AST/ByteCode/Compiler.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp
index 157e306..d3eabc5 100644
--- a/clang/lib/AST/ByteCode/Compiler.cpp
+++ b/clang/lib/AST/ByteCode/Compiler.cpp
@@ -6466,8 +6466,13 @@ bool Compiler<Emitter>::visitDeclRef(const ValueDecl *D, const Expr *E) {
// In case we need to re-visit a declaration.
auto revisit = [&](const VarDecl *VD) -> bool {
+ if (!this->emitPushCC(VD->hasConstantInitialization(), E))
+ return false;
auto VarState = this->visitDecl(VD, /*IsConstexprUnknown=*/true);
+ if (!this->emitPopCC(E))
+ return false;
+
if (VarState.notCreated())
return true;
if (!VarState)