summaryrefslogtreecommitdiff
path: root/src/private_typeinfo.h
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-01-11 00:11:17 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-01-11 00:11:17 +0000
commit16650b58dfc7d1a2632b052843dc4e21ae949b07 (patch)
treeee8ec64d61a093bfed0389c1e8d8d16dce3490ac /src/private_typeinfo.h
parent152beb7a421a05155ae339434c2b48e2151111cd (diff)
This is a transitory commit for __dynamic_cast. It contains debugging statements that are not intended to be in the finished product. However some of the dubbing statements themselves contain important documentation such as how to navigate a __class_type_info hierarchy, documenting object offset and inheritance access. The intention is that this debugging code will migrate into both actual code and comments. And capturing it here so that there is no chance this stuff will be lost.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@147898 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src/private_typeinfo.h')
-rw-r--r--src/private_typeinfo.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/private_typeinfo.h b/src/private_typeinfo.h
index 2a36985..766febe 100644
--- a/src/private_typeinfo.h
+++ b/src/private_typeinfo.h
@@ -43,13 +43,17 @@ public:
virtual ~__enum_type_info();
};
+// Has no base class
class __class_type_info
: public std::type_info
{
public:
virtual ~__class_type_info();
+
+ virtual void display(const void* obj) const;
};
+// Has one non-virtual public base class at offset zero
class __si_class_type_info
: public __class_type_info
{
@@ -57,6 +61,8 @@ public:
const __class_type_info* __base_type;
virtual ~__si_class_type_info();
+
+ virtual void display(const void* obj) const;
};
struct __base_class_type_info
@@ -68,11 +74,14 @@ public:
enum __offset_flags_masks
{
__virtual_mask = 0x1,
- __public_mask = 0x2,
+ __public_mask = 0x2, // base is public
__offset_shift = 8
};
+
+ void display(const void* obj) const;
};
+// Has one or more base classes
class __vmi_class_type_info
: public __class_type_info
{
@@ -83,11 +92,15 @@ public:
enum __flags_masks
{
- __non_diamond_repeat_mask = 0x1,
- __diamond_shaped_mask = 0x2
+ __non_diamond_repeat_mask = 0x1, // has two or more distinct base class
+ // objects of the same type
+ __diamond_shaped_mask = 0x2 // has base class object with two or
+ // more derived objects
};
virtual ~__vmi_class_type_info();
+
+ virtual void display(const void* obj) const;
};
class __pbase_type_info