From cddcf8734ed06ada9384a461bc21d58b44f6eba1 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Tue, 20 Mar 2012 16:56:14 +0000 Subject: Rework exception matching. - Remove typeinfo since thing break if the compiler decides to use the system one and merge its contents into typeinfo.h - Make each type_info object have a vtable with the same layout as the public vtable in libstdc++'s . This fixes code (e.g. libobjc2's Objective-C++ exception handling) which rely on being able to add new types. - Add some extra tests I suspect exceptions catching pointer-to-member types will not work correctly, but I've never seen anyone do this and don't have any tests for it. --- src/typeinfo | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 src/typeinfo (limited to 'src/typeinfo') diff --git a/src/typeinfo b/src/typeinfo deleted file mode 100644 index 74e77ae..0000000 --- a/src/typeinfo +++ /dev/null @@ -1,26 +0,0 @@ -namespace std -{ - /** - * Standard type info class. The layout of this class is specified by the - * ABI. - */ - class type_info - { - public: - /** - * Virtual destructor. This class must have one virtual function to - * ensure that it has a vtable. - */ - virtual ~type_info(); - bool operator==(const type_info &) const; - bool operator!=(const type_info &) const; - bool before(const type_info &) const; - const char* name() const; - type_info(); - private: - type_info(const type_info& rhs); - type_info& operator= (const type_info& rhs); - const char *__type_name; - }; -} - -- cgit v1.2.3