[clang] dc3b029 - [clang][Interp][NFC] Remove Function::Loc

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 16 02:25:33 PDT 2024


Author: Timm Bäder
Date: 2024-08-16T11:25:23+02:00
New Revision: dc3b029dc744730e69abac987c38b2d08b465fba

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

LOG: [clang][Interp][NFC] Remove Function::Loc

Unused.

Added: 
    

Modified: 
    clang/lib/AST/Interp/Function.cpp
    clang/lib/AST/Interp/Function.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/Function.cpp b/clang/lib/AST/Interp/Function.cpp
index 00f5a1fced531a..fc3345cbe123f8 100644
--- a/clang/lib/AST/Interp/Function.cpp
+++ b/clang/lib/AST/Interp/Function.cpp
@@ -21,10 +21,9 @@ Function::Function(Program &P, const FunctionDecl *F, unsigned ArgSize,
                    llvm::DenseMap<unsigned, ParamDescriptor> &&Params,
                    llvm::SmallVectorImpl<unsigned> &&ParamOffsets,
                    bool HasThisPointer, bool HasRVO, bool UnevaluatedBuiltin)
-    : P(P), Loc(F->getBeginLoc()), F(F), ArgSize(ArgSize),
-      ParamTypes(std::move(ParamTypes)), Params(std::move(Params)),
-      ParamOffsets(std::move(ParamOffsets)), HasThisPointer(HasThisPointer),
-      HasRVO(HasRVO), Variadic(F->isVariadic()),
+    : P(P), F(F), ArgSize(ArgSize), ParamTypes(std::move(ParamTypes)),
+      Params(std::move(Params)), ParamOffsets(std::move(ParamOffsets)),
+      HasThisPointer(HasThisPointer), HasRVO(HasRVO), Variadic(F->isVariadic()),
       IsUnevaluatedBuiltin(UnevaluatedBuiltin) {}
 
 Function::ParamDescriptor Function::getParamDescriptor(unsigned Offset) const {

diff  --git a/clang/lib/AST/Interp/Function.h b/clang/lib/AST/Interp/Function.h
index 92bcd96927912d..625d5af0407a72 100644
--- a/clang/lib/AST/Interp/Function.h
+++ b/clang/lib/AST/Interp/Function.h
@@ -100,9 +100,6 @@ class Function final {
     return F->getQualifiedNameAsString();
   }
 
-  /// Returns the location.
-  SourceLocation getLoc() const { return Loc; }
-
   /// Returns a parameter descriptor.
   ParamDescriptor getParamDescriptor(unsigned Offset) const;
 
@@ -235,8 +232,6 @@ class Function final {
 
   /// Program reference.
   Program &P;
-  /// Location of the executed code.
-  SourceLocation Loc;
   /// Declaration this function was compiled from.
   const FunctionDecl *F;
   /// Local area size: storage + metadata.


        


More information about the cfe-commits mailing list