8272884: Make VoidClosure::do_void pure virtual

Reviewed-by: kbarrett, dholmes
This commit is contained in:
Albert Mingkun Yang 2021-08-25 07:33:18 +00:00
parent 0f428ca533
commit 1e3e333f73
2 changed files with 1 additions and 7 deletions

View File

@ -40,10 +40,6 @@ void ObjectToOopClosure::do_object(oop obj) {
obj->oop_iterate(_cl);
}
void VoidClosure::do_void() {
ShouldNotCallThis();
}
void CodeBlobToOopClosure::do_nmethod(nmethod* nm) {
nm->oops_do(_cl);
if (_fix_relocations) {

View File

@ -283,9 +283,7 @@ class MonitorClosure : public StackObj {
// A closure that is applied without any arguments.
class VoidClosure : public StackObj {
public:
// I would have liked to declare this a pure virtual, but that breaks
// in mysterious ways, for unknown reasons.
virtual void do_void();
virtual void do_void() = 0;
};