From 9b2f2d846345dfbc4256db1ebf2b6176553fa157 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Tue, 4 Oct 2022 17:24:55 +0200 Subject: [PATCH] [clang][Interp][NFC] Remove unused function --- clang/lib/AST/Interp/ByteCodeExprGen.cpp | 12 ------------ clang/lib/AST/Interp/ByteCodeExprGen.h | 3 --- 2 files changed, 15 deletions(-) diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp index 2a25380..448bea9 100644 --- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp +++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp @@ -816,18 +816,6 @@ bool ByteCodeExprGen::visitInitializer(const Expr *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) { if (VD->isConstexpr()) { diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.h b/clang/lib/AST/Interp/ByteCodeExprGen.h index 5e5bbbd..f55ac2f 100644 --- a/clang/lib/AST/Interp/ByteCodeExprGen.h +++ b/clang/lib/AST/Interp/ByteCodeExprGen.h @@ -243,9 +243,6 @@ private: 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); -- 2.7.4