File tree 2 files changed +4
-5
lines changed
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ InterpFrame::~InterpFrame() {
76
76
77
77
void InterpFrame::destroy (unsigned Idx) {
78
78
for (auto &Local : Func->getScope (Idx).locals ()) {
79
- S.deallocate (reinterpret_cast <Block *>( localBlock (Local.Offset ) ));
79
+ S.deallocate (localBlock (Local.Offset ));
80
80
}
81
81
}
82
82
@@ -185,8 +185,7 @@ const FunctionDecl *InterpFrame::getCallee() const {
185
185
186
186
Pointer InterpFrame::getLocalPointer (unsigned Offset) const {
187
187
assert (Offset < Func->getFrameSize () && " Invalid local offset." );
188
- return Pointer (reinterpret_cast <Block *>(localBlock (Offset)),
189
- sizeof (InlineDescriptor));
188
+ return Pointer (localBlock (Offset), sizeof (InlineDescriptor));
190
189
}
191
190
192
191
Pointer InterpFrame::getParamPointer (unsigned Off) {
Original file line number Diff line number Diff line change @@ -133,8 +133,8 @@ class InterpFrame final : public Frame {
133
133
}
134
134
135
135
// / Returns a pointer to a local's block.
136
- void *localBlock (unsigned Offset) const {
137
- return Locals.get () + Offset - sizeof (Block);
136
+ Block *localBlock (unsigned Offset) const {
137
+ return reinterpret_cast <Block *>( Locals.get () + Offset - sizeof (Block) );
138
138
}
139
139
140
140
// Returns the inline descriptor of the local.
You can’t perform that action at this time.
0 commit comments