Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-01-11 04:11:17 +0400
committerHoward Hinnant <hhinnant@apple.com>2012-01-11 04:11:17 +0400
commitd9e73937412e8f837a3113efab9d4863f1f2af60 (patch)
tree858efa293a9deabf130a5a1bbfeec588e2cd0a97 /libcxxabi/src/private_typeinfo.h
parent43a11829754cbc09c34b81a9ebd48e3bc5956a1b (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.
llvm-svn: 147898
Diffstat (limited to 'libcxxabi/src/private_typeinfo.h')
-rw-r--r--libcxxabi/src/private_typeinfo.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/libcxxabi/src/private_typeinfo.h b/libcxxabi/src/private_typeinfo.h
index 2a36985730b7..766febe2f4fe 100644
--- a/libcxxabi/src/private_typeinfo.h
+++ b/libcxxabi/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