| Issue |
204433
|
| Summary |
Missing clarity/example on how to reference `std::type_info` / RTTI symbols for `__cxa_throw`
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
Mrostone
|
In the documentation [https://llvm.org/docs/ExceptionHandling.html](url) it is said to use `__cxa_throw` to throw an exeption.
> Languages that support exception handling typically provide a throw operation to initiate the exception process. Internally, a throw operation breaks down into two steps.
A request is made to allocate exception space for an exception structure. This structure needs to survive beyond the current activation. This structure will contain the type and value of the object being thrown.
A call is made to the runtime to raise the exception, passing the exception structure as an argument.
In C++, the allocation of the exception structure is done by the __cxa_allocate_exception runtime function. The exception raising is handled by __cxa_throw. The type of the exception is represented using a C++ RTTI structure.
However, it is unclear how to emit or reference std::type_info structures without hardcoding target-specific layouts inside the `.ll`.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs