Skip to content
Permalink
Browse files
8272884: Make VoidClosure::do_void pure virtual
Reviewed-by: kbarrett, dholmes
  • Loading branch information
albertnetymk committed Aug 25, 2021
1 parent 0f428ca commit 1e3e333f73fc448725175eba733c3eaf2f1b61b8
Showing with 1 addition and 7 deletions.
  1. +0 −4 src/hotspot/share/memory/iterator.cpp
  2. +1 −3 src/hotspot/share/memory/iterator.hpp
@@ -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) {
@@ -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;
};


1 comment on commit 1e3e333

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 1e3e333 Aug 25, 2021

Please sign in to comment.