Skip to content

Commit 70e61f5

Browse files
committed
[clang][Interp][NFC] Rename InitPtr{,Pop} to FinishInit{,Pop}
The old name clashes with the Init opcode.
1 parent 04db60d commit 70e61f5

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

clang/lib/AST/Interp/ByteCodeExprGen.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ bool ByteCodeExprGen<Emitter>::visitInitList(ArrayRef<const Expr *> Inits,
897897
if (!this->visitInitializer(Init))
898898
return false;
899899

900-
if (!this->emitInitPtrPop(E))
900+
if (!this->emitFinishInitPop(E))
901901
return false;
902902
// Base initializers don't increase InitIndex, since they don't count
903903
// into the Record's fields.
@@ -940,7 +940,7 @@ bool ByteCodeExprGen<Emitter>::visitArrayElemInit(unsigned ElemIndex,
940940
return false;
941941
if (!this->visitInitializer(Init))
942942
return false;
943-
return this->emitInitPtrPop(Init);
943+
return this->emitFinishInitPop(Init);
944944
}
945945

946946
template <class Emitter>
@@ -2151,7 +2151,7 @@ bool ByteCodeExprGen<Emitter>::VisitCXXUuidofExpr(const CXXUuidofExpr *E) {
21512151
}
21522152
}
21532153

2154-
return this->emitInitPtr(E);
2154+
return this->emitFinishInit(E);
21552155
}
21562156

21572157
template <class Emitter>
@@ -2364,7 +2364,7 @@ bool ByteCodeExprGen<Emitter>::visitZeroRecordInitializer(const Record *R,
23642364
return false;
23652365
if (!this->visitZeroRecordInitializer(B.R, E))
23662366
return false;
2367-
if (!this->emitInitPtrPop(E))
2367+
if (!this->emitFinishInitPop(E))
23682368
return false;
23692369
}
23702370

@@ -2544,7 +2544,7 @@ bool ByteCodeExprGen<Emitter>::visitExpr(const Expr *E) {
25442544
if (!visitInitializer(E))
25452545
return false;
25462546

2547-
if (!this->emitInitPtr(E))
2547+
if (!this->emitFinishInit(E))
25482548
return false;
25492549
return this->emitRetValue(E);
25502550
}

clang/lib/AST/Interp/ByteCodeExprGen.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class ByteCodeExprGen : public ConstStmtVisitor<ByteCodeExprGen<Emitter>, bool>,
182182
if (!visitInitializer(Init))
183183
return false;
184184

185-
if (!this->emitInitPtr(Init))
185+
if (!this->emitFinishInit(Init))
186186
return false;
187187

188188
return this->emitPopPtr(Init);
@@ -196,7 +196,7 @@ class ByteCodeExprGen : public ConstStmtVisitor<ByteCodeExprGen<Emitter>, bool>,
196196
if (!visitInitializer(Init))
197197
return false;
198198

199-
if (!this->emitInitPtr(Init))
199+
if (!this->emitFinishInit(Init))
200200
return false;
201201

202202
return this->emitPopPtr(Init);
@@ -210,7 +210,7 @@ class ByteCodeExprGen : public ConstStmtVisitor<ByteCodeExprGen<Emitter>, bool>,
210210
if (!visitInitializer(I))
211211
return false;
212212

213-
return this->emitInitPtrPop(I);
213+
return this->emitFinishInitPop(I);
214214
}
215215

216216
bool visitInitList(ArrayRef<const Expr *> Inits, const Expr *E);

clang/lib/AST/Interp/ByteCodeStmtGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ bool ByteCodeStmtGen<Emitter>::visitFunc(const FunctionDecl *F) {
200200
return false;
201201
if (!this->visitInitializer(InitExpr))
202202
return false;
203-
if (!this->emitInitPtrPop(InitExpr))
203+
if (!this->emitFinishInitPop(InitExpr))
204204
return false;
205205
} else if (const IndirectFieldDecl *IFD = Init->getIndirectMember()) {
206206
assert(IFD->getChainingSize() >= 2);

clang/lib/AST/Interp/Interp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,14 +1280,14 @@ inline bool GetPtrThisBase(InterpState &S, CodePtr OpPC, uint32_t Off) {
12801280
return true;
12811281
}
12821282

1283-
inline bool InitPtrPop(InterpState &S, CodePtr OpPC) {
1283+
inline bool FinishInitPop(InterpState &S, CodePtr OpPC) {
12841284
const Pointer &Ptr = S.Stk.pop<Pointer>();
12851285
if (Ptr.canBeInitialized())
12861286
Ptr.initialize();
12871287
return true;
12881288
}
12891289

1290-
inline bool InitPtr(InterpState &S, CodePtr OpPC) {
1290+
inline bool FinishInit(InterpState &S, CodePtr OpPC) {
12911291
const Pointer &Ptr = S.Stk.peek<Pointer>();
12921292

12931293
if (Ptr.canBeInitialized())

clang/lib/AST/Interp/Opcodes.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ def GetPtrBasePop : Opcode {
326326
let Args = [ArgUint32];
327327
}
328328

329-
def InitPtrPop : Opcode;
330-
def InitPtr : Opcode;
329+
def FinishInitPop : Opcode;
330+
def FinishInit : Opcode;
331331

332332
def GetPtrDerivedPop : Opcode {
333333
let Args = [ArgUint32];

0 commit comments

Comments
 (0)