[clang] 21d8085 - [clang][Interp][NFC] Rename DummyParams to DummyVariables

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 14 06:22:46 PDT 2024


Author: Timm Bäder
Date: 2024-03-14T14:05:33+01:00
New Revision: 21d80859df3fb416efac13ce8178fdf6d6489292

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

LOG: [clang][Interp][NFC] Rename DummyParams to DummyVariables

We create dummy descriptors for variables other than parameters
these days.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/Program.cpp b/clang/lib/AST/Interp/Program.cpp
index 86e18ede638114..58bddb991fd6de 100644
--- a/clang/lib/AST/Interp/Program.cpp
+++ b/clang/lib/AST/Interp/Program.cpp
@@ -145,7 +145,7 @@ std::optional<unsigned> Program::getOrCreateGlobal(const ValueDecl *VD,
 
 std::optional<unsigned> Program::getOrCreateDummy(const ValueDecl *VD) {
   // Dedup blocks since they are immutable and pointers cannot be compared.
-  if (auto It = DummyParams.find(VD); It != DummyParams.end())
+  if (auto It = DummyVariables.find(VD); It != DummyVariables.end())
     return It->second;
 
   // Create dummy descriptor.
@@ -158,7 +158,7 @@ std::optional<unsigned> Program::getOrCreateDummy(const ValueDecl *VD) {
   G->block()->invokeCtor();
 
   Globals.push_back(G);
-  DummyParams[VD] = I;
+  DummyVariables[VD] = I;
   return I;
 }
 

diff  --git a/clang/lib/AST/Interp/Program.h b/clang/lib/AST/Interp/Program.h
index 50bdb575e805cf..36b5a1faa513a9 100644
--- a/clang/lib/AST/Interp/Program.h
+++ b/clang/lib/AST/Interp/Program.h
@@ -208,7 +208,7 @@ class Program final {
   llvm::DenseMap<const RecordDecl *, Record *> Records;
 
   /// Dummy parameter to generate pointers from.
-  llvm::DenseMap<const ValueDecl *, unsigned> DummyParams;
+  llvm::DenseMap<const ValueDecl *, unsigned> DummyVariables;
 
   /// Creates a new descriptor.
   template <typename... Ts>


        


More information about the cfe-commits mailing list