[clang] 968f030 - [clang][bytecode][NFC] Remove unused SourceMapper functions (#219786)

via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 30 09:31:42 PDT 2026


Author: Timm Baeder
Date: 2026-08-30T18:31:36+02:00
New Revision: 968f030b3bda0e74952352f040ce64788d58fcde

URL: https://github.com/llvm/llvm-project/commit/968f030b3bda0e74952352f040ce64788d58fcde
DIFF: https://github.com/llvm/llvm-project/commit/968f030b3bda0e74952352f040ce64788d58fcde.diff

LOG: [clang][bytecode][NFC] Remove unused SourceMapper functions (#219786)

Added: 
    

Modified: 
    clang/lib/AST/ByteCode/Source.cpp
    clang/lib/AST/ByteCode/Source.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/ByteCode/Source.cpp b/clang/lib/AST/ByteCode/Source.cpp
index 412fce2be5737..a56a5becb2b75 100644
--- a/clang/lib/AST/ByteCode/Source.cpp
+++ b/clang/lib/AST/ByteCode/Source.cpp
@@ -31,15 +31,3 @@ SourceRange SourceInfo::getRange() const {
     return D->getSourceRange();
   return SourceRange();
 }
-
-const Expr *SourceMapper::getExpr(CodePtr PC) const {
-  return getSource(PC).asExpr();
-}
-
-SourceLocation SourceMapper::getLocation(CodePtr PC) const {
-  return getSource(PC).getLoc();
-}
-
-SourceRange SourceMapper::getRange(CodePtr PC) const {
-  return getSource(PC).getRange();
-}

diff  --git a/clang/lib/AST/ByteCode/Source.h b/clang/lib/AST/ByteCode/Source.h
index db935da7c7c49..37548f47f9082 100644
--- a/clang/lib/AST/ByteCode/Source.h
+++ b/clang/lib/AST/ByteCode/Source.h
@@ -130,12 +130,6 @@ class SourceMapper {
 
   /// Returns source information for a given PC in a function.
   virtual SourceInfo getSource(CodePtr PC) const = 0;
-
-  /// Returns the expression if an opcode belongs to one, null otherwise.
-  const Expr *getExpr(CodePtr PC) const;
-  /// Returns the location from which an opcode originates.
-  SourceLocation getLocation(CodePtr PC) const;
-  SourceRange getRange(CodePtr PC) const;
 };
 
 } // namespace interp


        


More information about the cfe-commits mailing list