Skip to content

Commit e64e478

Browse files
committed
[clang][Interp][NFC] Rename a parameter
1 parent 051fade commit e64e478

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

clang/lib/AST/Interp/Program.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,13 @@ std::optional<unsigned> Program::getOrCreateGlobal(const ValueDecl *VD,
138138
return std::nullopt;
139139
}
140140

141-
std::optional<unsigned> Program::getOrCreateDummy(const ValueDecl *PD) {
141+
std::optional<unsigned> Program::getOrCreateDummy(const ValueDecl *VD) {
142142
// Dedup blocks since they are immutable and pointers cannot be compared.
143-
if (auto It = DummyParams.find(PD);
144-
It != DummyParams.end())
143+
if (auto It = DummyParams.find(VD); It != DummyParams.end())
145144
return It->second;
146145

147146
// Create dummy descriptor.
148-
Descriptor *Desc = allocateDescriptor(PD, std::nullopt);
147+
Descriptor *Desc = allocateDescriptor(VD, std::nullopt);
149148
// Allocate a block for storage.
150149
unsigned I = Globals.size();
151150

@@ -154,7 +153,7 @@ std::optional<unsigned> Program::getOrCreateDummy(const ValueDecl *PD) {
154153
G->block()->invokeCtor();
155154

156155
Globals.push_back(G);
157-
DummyParams[PD] = I;
156+
DummyParams[VD] = I;
158157
return I;
159158
}
160159

clang/lib/AST/Interp/Program.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class Program final {
8383
const Expr *Init = nullptr);
8484

8585
/// Returns or creates a dummy value for unknown declarations.
86-
std::optional<unsigned> getOrCreateDummy(const ValueDecl *PD);
86+
std::optional<unsigned> getOrCreateDummy(const ValueDecl *VD);
8787

8888
/// Creates a global and returns its index.
8989
std::optional<unsigned> createGlobal(const ValueDecl *VD, const Expr *E);

0 commit comments

Comments
 (0)