diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp index 2a25380df6072e..448bea9ab2678d 100644 --- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp +++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp @@ -815,18 +815,6 @@ bool ByteCodeExprGen::visitInitializer(const Expr *Initializer) { return this->Visit(Initializer); } -template -bool ByteCodeExprGen::getPtrVarDecl(const VarDecl *VD, const Expr *E) { - // Generate a pointer to the local, loading refs. - if (Optional Idx = getGlobalIdx(VD)) { - if (VD->getType()->isReferenceType()) - return this->emitGetGlobalPtr(*Idx, E); - else - return this->emitGetPtrGlobal(*Idx, E); - } - return this->bail(VD); -} - template llvm::Optional ByteCodeExprGen::getGlobalIdx(const VarDecl *VD) { diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.h b/clang/lib/AST/Interp/ByteCodeExprGen.h index 5e5bbbd6948aa2..f55ac2ff433bf8 100644 --- a/clang/lib/AST/Interp/ByteCodeExprGen.h +++ b/clang/lib/AST/Interp/ByteCodeExprGen.h @@ -243,9 +243,6 @@ class ByteCodeExprGen : public ConstStmtVisitor, bool>, return emitConst(*Ctx.classify(Ty), NumBits, WrappedValue, E); } - /// Returns a pointer to a variable declaration. - bool getPtrVarDecl(const VarDecl *VD, const Expr *E); - /// Returns the index of a global. llvm::Optional getGlobalIdx(const VarDecl *VD);