Remove a TODO regarding where some can_catch are implemented. I opted to make can_catch pure virtual in the top __shim_type_info, and have each sub-class implement its own. There are some repeated definitions, but they are trivial.
llvm-svn: 149537
This commit is contained in:
parent
c325fa7705
commit
089123e65f
|
|
@ -218,15 +218,7 @@ __pointer_to_member_type_info::display() const
|
||||||
//
|
//
|
||||||
// catch (...) : adjustedPtr == & of the exception
|
// catch (...) : adjustedPtr == & of the exception
|
||||||
|
|
||||||
bool
|
|
||||||
__shim_type_info::can_catch(const __shim_type_info* thrown_type,
|
|
||||||
void*&) const
|
|
||||||
{
|
|
||||||
return this == thrown_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handles bullet 1
|
// Handles bullet 1
|
||||||
// TODO: Let __shim_type_info handle it?
|
|
||||||
bool
|
bool
|
||||||
__fundamental_type_info::can_catch(const __shim_type_info* thrown_type,
|
__fundamental_type_info::can_catch(const __shim_type_info* thrown_type,
|
||||||
void*&) const
|
void*&) const
|
||||||
|
|
@ -257,7 +249,6 @@ __function_type_info::can_catch(const __shim_type_info* thrown_type,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handles bullet 1
|
// Handles bullet 1
|
||||||
// TODO: Let __shim_type_info handle it?
|
|
||||||
bool
|
bool
|
||||||
__enum_type_info::can_catch(const __shim_type_info* thrown_type,
|
__enum_type_info::can_catch(const __shim_type_info* thrown_type,
|
||||||
void*&) const
|
void*&) const
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ class __shim_type_info
|
||||||
public:
|
public:
|
||||||
virtual ~__shim_type_info();
|
virtual ~__shim_type_info();
|
||||||
|
|
||||||
virtual bool can_catch(const __shim_type_info* thrown_type, void*& adjustedPtr) const;
|
virtual bool can_catch(const __shim_type_info* thrown_type, void*& adjustedPtr) const = 0;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
virtual void display() const = 0;
|
virtual void display() const = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue