Make the FrameBuffer class pure abstract.

Sanitizer tools desire having the vtables of any class with non-pure
virtual methods, even when none of them are called in the current
linkage unit. In the case of sw::FrameBuffer, to work around this we can
make the class pure abstract by making the destructor pure virtual. Note
that the destructor still has a non-empty definition, since all non-
default destructors need a defintion, and it will get called as part of
the destructor chain.

Bug swiftshader:31

Change-Id: I7601b1a725c513ff484cd34a8965636b7f21513c
Reviewed-on: https://swiftshader-review.googlesource.com/9912
Reviewed-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <capn@google.com>
diff --git a/src/Main/FrameBuffer.cpp b/src/Main/FrameBuffer.cpp
index ebfebed..e95f766 100644
--- a/src/Main/FrameBuffer.cpp
+++ b/src/Main/FrameBuffer.cpp
@@ -35,7 +35,6 @@
 
 	FrameBuffer::Cursor FrameBuffer::cursor = {};
 	bool FrameBuffer::topLeftOrigin = false;
-	void FrameBuffer::typeinfo() {}
 
 	FrameBuffer::FrameBuffer(int width, int height, bool fullscreen, bool topLeftOrigin)
 	{
diff --git a/src/Main/FrameBuffer.hpp b/src/Main/FrameBuffer.hpp
index 10ef6bc..a18a0b1 100644
--- a/src/Main/FrameBuffer.hpp
+++ b/src/Main/FrameBuffer.hpp
@@ -36,12 +36,10 @@
 
 	class [[clang::lto_visibility_public]] FrameBuffer
 	{
-		virtual void typeinfo();   // Dummy key method (https://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html)
-
 	public:
 		FrameBuffer(int width, int height, bool fullscreen, bool topLeftOrigin);
 
-		virtual ~FrameBuffer();
+		virtual ~FrameBuffer() = 0;
 
 		int getWidth() const;
 		int getHeight() const;
diff --git a/src/Main/FrameBufferAndroid.hpp b/src/Main/FrameBufferAndroid.hpp
index 4995ecb..354a571 100644
--- a/src/Main/FrameBufferAndroid.hpp
+++ b/src/Main/FrameBufferAndroid.hpp
@@ -28,7 +28,7 @@
 	public:
 		FrameBufferAndroid(ANativeWindow* window, int width, int height);
 
-		~FrameBufferAndroid();
+		~FrameBufferAndroid() override;
 
 		void flip(void *source, Format sourceFormat, size_t sourceStride) override {blit(source, 0, 0, sourceFormat, sourceStride);};
 		void blit(void *source, const Rect *sourceRect, const Rect *destRect, Format sourceFormat, size_t sourceStride) override;
diff --git a/src/Main/FrameBufferDD.hpp b/src/Main/FrameBufferDD.hpp
index c2d160a..efe6d68 100644
--- a/src/Main/FrameBufferDD.hpp
+++ b/src/Main/FrameBufferDD.hpp
@@ -26,7 +26,7 @@
 	public:
 		FrameBufferDD(HWND windowHandle, int width, int height, bool fullscreen, bool topLeftOrigin);
 
-		virtual ~FrameBufferDD();
+		~FrameBufferDD() override;
 
 		void flip(void *source, Format sourceFormat, size_t sourceStride) override;
 		void blit(void *source, const Rect *sourceRect, const Rect *destRect, Format sourceFormat, size_t sourceStride) override;
diff --git a/src/Main/FrameBufferGDI.hpp b/src/Main/FrameBufferGDI.hpp
index f81cb8f..efe44a9 100644
--- a/src/Main/FrameBufferGDI.hpp
+++ b/src/Main/FrameBufferGDI.hpp
@@ -24,8 +24,8 @@
 	public:
 		FrameBufferGDI(HWND windowHandle, int width, int height, bool fullscreen, bool topLeftOrigin);
 
-		virtual ~FrameBufferGDI();
-		
+		~FrameBufferGDI() override;
+
 		void flip(void *source, Format sourceFormat, size_t sourceStride) override;
 		void blit(void *source, const Rect *sourceRect, const Rect *destRect, Format sourceFormat, size_t sourceStride) override;
 
diff --git a/src/Main/FrameBufferWin.hpp b/src/Main/FrameBufferWin.hpp
index 2393658..e302195 100644
--- a/src/Main/FrameBufferWin.hpp
+++ b/src/Main/FrameBufferWin.hpp
@@ -31,7 +31,7 @@
 	public:
 		FrameBufferWin(HWND windowHandle, int width, int height, bool fullscreen, bool topLeftOrigin);
 
-		virtual ~FrameBufferWin();
+		~FrameBufferWin() override;
 
 		void flip(void *source, Format sourceFormat, size_t sourceStride) override = 0;
 		void blit(void *source, const Rect *sourceRect, const Rect *destRect, Format sourceFormat, size_t sourceStride) override = 0;
diff --git a/src/Main/FrameBufferX11.hpp b/src/Main/FrameBufferX11.hpp
index a9c481b..e76c81e 100644
--- a/src/Main/FrameBufferX11.hpp
+++ b/src/Main/FrameBufferX11.hpp
@@ -33,7 +33,7 @@
 	public:
 		FrameBufferX11(Display *display, Window window, int width, int height);
 
-		~FrameBufferX11();
+		~FrameBufferX11() override;
 
 		void flip(void *source, Format sourceFormat, size_t sourceStride) override {blit(source, 0, 0, sourceFormat, sourceStride);};
 		void blit(void *source, const Rect *sourceRect, const Rect *destRect, Format sourceFormat, size_t sourceStride) override;
diff --git a/src/OpenGL/libEGL/TypeInfo.cpp b/src/OpenGL/libEGL/TypeInfo.cpp
index 0b4b97e..370c865 100644
--- a/src/OpenGL/libEGL/TypeInfo.cpp
+++ b/src/OpenGL/libEGL/TypeInfo.cpp
@@ -18,7 +18,6 @@
 
 namespace sw
 {
-void FrameBuffer::typeinfo() {}
 void Surface::typeinfo() {}
 }