-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch adds the `cir.dyn_cast` operation to model the C++ `dynamic_cast` operator. CIRGen code for the new operation is also included. During LLVMIR lowering prepare, the operation will be replaced by more basic CIR operations. The new operation is attached an attribute named `#cir.dyn_cast_info` that contains ABI information about the cast. During CIRGen, `CIRGenCXXABI` will generate and populate the attribute. During LLVMIR lowering prepare, the attribute will be used to generate code for the operation. Since the code generated by the new operation is also highly ABI-specific, this patch adds a new class `LoweringPrepareCXXABI` that provides ABI-specific behaviors for lowering prepare. Similar to `CIRGenCXXABI`, the class is an abstract base class that concrete ABIs can inherit and implement. This patch includes a `LoweringPrepareItaniumCXXABI` class that provides Itanium C++ ABI behaviors for lowering prepare.
- Loading branch information
Showing
16 changed files
with
540 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.