Revert "EHScopeStack::Cleanup has virtual functions so the destructor should be too."
authorDavid Blaikie <dblaikie@gmail.com>
Sun, 22 Mar 2020 04:17:33 +0000 (21:17 -0700)
committerDavid Blaikie <dblaikie@gmail.com>
Sun, 22 Mar 2020 04:17:33 +0000 (21:17 -0700)
This type was already well designed - having a protected destructor, and
derived classes being final/public non-virtual destructors, the type
couldn't be destroyed polymorphically & accidentally cause slicing.

This reverts commit 736385c0b49d42f398ffa1458883f0d182178ef4.

clang/lib/CodeGen/EHScopeStack.h

index 4dd3da3..0ed67aa 100644 (file)
@@ -148,7 +148,7 @@ public:
     virtual void anchor();
 
   protected:
-    virtual ~Cleanup() = default;
+    ~Cleanup() = default;
 
   public:
     Cleanup(const Cleanup &) = default;