[clang][Interp][NFC] Remove unused function
authorTimm Bäder <tbaeder@redhat.com>
Tue, 4 Oct 2022 15:24:55 +0000 (17:24 +0200)
committerTimm Bäder <tbaeder@redhat.com>
Fri, 14 Oct 2022 11:32:00 +0000 (13:32 +0200)
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/lib/AST/Interp/ByteCodeExprGen.h

index 2a25380..448bea9 100644 (file)
@@ -816,18 +816,6 @@ bool ByteCodeExprGen<Emitter>::visitInitializer(const Expr *Initializer) {
 }
 
 template <class Emitter>
-bool ByteCodeExprGen<Emitter>::getPtrVarDecl(const VarDecl *VD, const Expr *E) {
-  // Generate a pointer to the local, loading refs.
-  if (Optional<unsigned> Idx = getGlobalIdx(VD)) {
-    if (VD->getType()->isReferenceType())
-      return this->emitGetGlobalPtr(*Idx, E);
-    else
-      return this->emitGetPtrGlobal(*Idx, E);
-  }
-  return this->bail(VD);
-}
-
-template <class Emitter>
 llvm::Optional<unsigned>
 ByteCodeExprGen<Emitter>::getGlobalIdx(const VarDecl *VD) {
   if (VD->isConstexpr()) {
index 5e5bbbd..f55ac2f 100644 (file)
@@ -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<unsigned> getGlobalIdx(const VarDecl *VD);