Skip to content

Commit 9b1f32c

Browse files
andykaylorsvkeerthy
authored andcommitted
[CIR][NFC] Remove dead member function from EHScopeStack::Cleanup (#162565)
This removes the `getSize()` member function from EHScopeStack::Cleanup and all its subclasses. This function had originally been added as a temporary measure before EHCleanupScope was implemented, but it is no longer used.
1 parent 36e8ded commit 9b1f32c

File tree

4 files changed

+0
-21
lines changed

4 files changed

+0
-21
lines changed

clang/lib/CIR/CodeGen/CIRGenClass.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -891,12 +891,6 @@ class DestroyField final : public EHScopeStack::Cleanup {
891891
assert(!cir::MissingFeatures::ehCleanupFlags());
892892
cgf.emitDestroy(lv.getAddress(), field->getType(), destroyer);
893893
}
894-
895-
// This is a placeholder until EHCleanupScope is implemented.
896-
size_t getSize() const override {
897-
assert(!cir::MissingFeatures::ehCleanupScope());
898-
return sizeof(DestroyField);
899-
}
900894
};
901895
} // namespace
902896

clang/lib/CIR/CodeGen/CIRGenDecl.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -695,12 +695,6 @@ struct DestroyObject final : EHScopeStack::Cleanup {
695695
void emit(CIRGenFunction &cgf) override {
696696
cgf.emitDestroy(addr, type, destroyer);
697697
}
698-
699-
// This is a placeholder until EHCleanupScope is implemented.
700-
size_t getSize() const override {
701-
assert(!cir::MissingFeatures::ehCleanupScope());
702-
return sizeof(DestroyObject);
703-
}
704698
};
705699
} // namespace
706700

clang/lib/CIR/CodeGen/CIRGenExprCXX.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -463,12 +463,6 @@ struct CallObjectDelete final : EHScopeStack::Cleanup {
463463
void emit(CIRGenFunction &cgf) override {
464464
cgf.emitDeleteCall(operatorDelete, ptr, elementType);
465465
}
466-
467-
// This is a placeholder until EHCleanupScope is implemented.
468-
size_t getSize() const override {
469-
assert(!cir::MissingFeatures::ehCleanupScope());
470-
return sizeof(CallObjectDelete);
471-
}
472466
};
473467
} // namespace
474468

clang/lib/CIR/CodeGen/EHScopeStack.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,6 @@ class EHScopeStack {
108108
///
109109
// \param flags cleanup kind.
110110
virtual void emit(CIRGenFunction &cgf) = 0;
111-
112-
// This is a placeholder until EHScope is implemented.
113-
virtual size_t getSize() const = 0;
114111
};
115112

116113
private:

0 commit comments

Comments
 (0)